[Chimera-users] Transformation matrices
Greg Couch
gregc at cgl.ucsf.edu
Fri Jun 29 02:26:45 PDT 2007
On Fri, 29 Jun 2007, Eduardo Sanz-Garcia wrote:
> I am getting the rotation matrices (I am not interested in the
> translation column) using matrixget command.
> My naive question: Should I use in this way:
>
> x' x
> y' = [3x3 matrix] y
> z' z
>
>
> or in this other way?
>
> z' z
> y' = [3x3 matrix'] y
> x' x
>
>
> Thank you very much.
It's the first way. The coordinate system is right-handed with column
vectors for Points and Vectors (eg., normals) which would be on the right
hand side of the matrix matrixset/matrixget uses. An additional row of
[0 0 0 1] could be added on if you wanted a 4x4 matrix. For Point or
Vector transformations, Points have an implicit forth value of one:
Px' R00 R01 R01 Tx Px
Py' = R10 R11 R12 Ty * Py
Pz' R20 R21 R22 Tz Pz
1
And Vectors and an implicit forth value of zero:
Vx' R00 R01 R01 Tx Vx
Vy' = R10 R11 R12 Ty * Vy
Vz' R20 R21 R22 Tz Vz
0
So Vector transformations ignore the translation part.
Greg Couch
UCSF Computer Graphics Lab
More information about the Chimera-users
mailing list