[Chimera-users] trigonometry
Greg Couch
gregc at cgl.ucsf.edu
Mon Apr 3 11:52:11 PDT 2006
On Mon, 3 Apr 2006, Thomas Goddard wrote:
> Hi Jean-Francois,
>
> The Chimera matrixget command writes out a 3 by 4 matrix to a file like:
>
> Model 0.0
> 0.440056 0.454627 0.774381 -31.4343
> 0.0100309 0.859825 -0.51049 20.8174
> -0.897914 0.232412 0.373811 25.777
>
> The first 3 columns are a 3 by 3 rotation matrix and the 4th column is
> an amount to translate. This matrix tells how to rotate and translate
> the original data set to its current position in the Chimera coordinate
> system. Another way to look at it is that the data set x-axis is pointed
> in the direction of the first column of this matrix in the Chimera
> coordinate system. In the above case the data set x-axis is oriented
> in direction (0.440056, 0.0100309, -0.897914) in Chimera coordinates,
> so pointed roughly in the -z direction which is into the screen.
>
> I'm not sure what angles you want. We don't have a routine to produce
> Euler angles from the rotation matrix although the formulas could be
> found in a textbook. If you want Euler angles, I can probably look it
> up and give you some Python code that will report those directly from
> Chimera. Another possibility is to get the axis and amount of rotation
> for the above rotation matrix. That is can also easily be done using
> Python in Chimera. Let me know if you are interested in those details.
>
> Tom
In other words, chimera uses a right-handed coordinate system, and there
is an implicit forth row containing (0 0 0 1). If you were to transform a
point using the matrix, you would write it as a column vector (x y z 1)T
to the right of the matrix. The 4x4 matrix is a homogeneous
transformation matrix that combines both rotation and translation. The
chimera form matches math and physics uses of rotation matrices, and the
transpose matches the form in many computer graphics texts.
- Greg
More information about the Chimera-users
mailing list