[ODE] Rotation matrices

Lewis Foster doof205 at gmail.com
Thu Dec 28 11:41:58 MST 2006


Not strictly a question on ODE but im hoping someone can spend a minute
helping me out with rotations. Basically I'm trying to rotate an object by
90 degrees in the Z axis (vertically upwards right?), then by 45 degrees in
the X.

>From this i figured there were two rotation matrices:

Z rotation (90 degrees):

0  -1  0
1   0  0
0   0  1

X rotation (45 degrees):

1    0         0
0    0.71    -0.71
0    0.71     0.71

Now i've multiplied these together and obviously depending on which way you
do it, you get two possible results. Now I've tried converting the two
resulting matrices to axis-angle representations using this applet (
http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/program/index.htm
)

However, the two matrices return the same axis-angle representation, when
clearly they will be different. Interestingly the image being shown on the
applet in the above link is different for the two matrices (expected), yet
the axis-angle result is the same....surely this isn't possible?

This means im struggling to get the correct axis-angle representation for
the ODE function to use. (X 0.35, Y 0.35, Z 0.85, radians 1.7) isn't
correct. This representation is 45 degrees about X, and THEN 90 about Z. Any
help would be greatly appreciated!

Lewis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20061228/854d3e9a/attachment.htm


More information about the ODE mailing list