Are the columns of a rotation-matrix the same as the 3 axes???

Started by
2 comments, last by Moldie 16 years, 4 months ago
hey everyone, i found an algorithm about the separating axis theorem in the net. Link The author there splits the rotation matrix into three vectors and calls them the axes.

Matrix4 matB = b.m_matRot*a.m_matRotInverse;

Vector3 XAxis(matB._11,matB._21,matB._31);
Vector3 YAxis(matB._12,matB._22,matB._32);
Vector3 ZAxis(matB._13,matB._23,matB._33);


Is this correct??? do the three columns represent the rotation around the three axes??? because as far as i know the rotation-matrix of 3 euler-angles is calculated in a different way: thanks for the help! greetings, anchelito
Advertisement
A rotation matrix contains the basis vectors of the new coordinate system.
The identity rotation of
1,0,0
0,1,0
0,0,1
gives you your X,Y,Z axis. A rotation of these axis give you 3 new ortho-normal vectors that then make up the associated
rotation matrix. So if the identity rotation is your "world X,Y,Z" the axis he is extracting there would be your object's "local X,Y,Z".
This is usually less confusing when expressed as the "at, up, left" vectors of a rotation matrix.
okay, that makes sense!

thanks a lot!
That's right. This is the way I visualize the rotation matrix, and I find it the most comprehensive way to think of it. The coordinate is simply transformed by "projecting" it onto each of these axes by using three dot-product calculations.

The matrices described beneath your post can be thought of as each one of the matrices contains two vectors, or a frame describing the YZ-, XZ- and XY-plane respectively. The matrix multiplication to be performed in order to obtain the final 3-dimensional matrix, is in fact a series of calculations of the type described above (one frame's vectors are projected onto the other frame's vectors).
Peter

This topic is closed to new replies.

Advertisement