[ODE] Rotation about Z-axis clockwise ?

Antonio Tejada Lacaci wildfred at teleline.es
Wed Aug 27 04:37:02 2003


On Tue, 26 Aug 2003 17:31:33 +0200, thomas.miconi@free.fr wrote:

>Hello,  
> 
>when using dRFromAxisAndAngle(r, 0, 0, 1, pi / 4) to make a rotation about the 
>z-axis of pi/4 radians, I obtain a final matrix whose coordinates are:  
>((0.7071, -0.7071, 0) 
> (0.7071, 0.7071, 0) 
> (0, 0, 1)) 
> 
>I get something similar when using quaternions. 
> 
>According to the Rule Thumb, this seems to correspond to an indirect rotation 
>about the z-axis (i.e. clockwise rotation if the z-axis points to you). 

If you are in a "right-handed coordinate system", i.e. a system which
holds the right-hand rule, rotating when the axis points towards you
(out of the computer screen) is counterclockwise, not clockwise.

>So is the bug in my code, in my head, or in my right hand ? 

I believe it's in your right hand ;)
See http://mathworld.wolfram.com/Right-HandedCoordinateSystem.html and
http://mathworld.wolfram.com/Right-HandRule.html

>Amicalement, 
>Thomas  
>====== 
>_______________________________________________
>ODE mailing list
>ODE@q12.org
>http://q12.org/mailman/listinfo/ode


Cheers!

Antonio Tejada Lacaci