VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Sep 03 2010 - 10:08:34 CDT
- Next message: Eduardo: "Re: Matrix based intermediate rotations"
- Previous message: Ajasja Ljubetič: "Re: How to set the default mol style as VDW?"
- In reply to: Bogdan Costescu: "Matrix based intermediate rotations"
- Next in thread: Eduardo: "Re: Matrix based intermediate rotations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Bogdan,
You might try using a quaternion approach (converting from matrix
to quaternion and back):
http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Fri, Sep 03, 2010 at 12:50:40PM +0200, Bogdan Costescu wrote:
> Hi!
>
> I'm trying to do some animations that require rotations of single
> structures (=no trajectories). Normally I would use 'rotate' to bring
> the orientation from the original viewpoint to the desired one.
> However I want to align the structure in a particular way with respect
> to the viewer, so I use something like:
>
> set M [transvecinv $vector]
> molinfo 0 set rotate_matrix [list $M]
>
> which gives me the desired viewpoint. The original viewpoint is either
> the one VMD sets automatically after loading the structure or a
> previous one obtained through the above procedure. But I haven't found
> a way to compute the intermediate rotations needed for the animation.
> Is there a "matrix way" of doing it or does one have to peek in $M ?
> Either way, if someone has done this already, I would appreciate some
> guidance or even better some code.
>
> Cheers,
> Bogdan
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Eduardo: "Re: Matrix based intermediate rotations"
- Previous message: Ajasja Ljubetič: "Re: How to set the default mol style as VDW?"
- In reply to: Bogdan Costescu: "Matrix based intermediate rotations"
- Next in thread: Eduardo: "Re: Matrix based intermediate rotations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]