|
|
Simon Lemieux wrote:
> > > Rotate x: <x,y,z> -> <x,y*cos-z*sin,z*cos+y*sin>
> > > Rotate y: <x,y,z> -> <x*cos+z*sin,y,z*cos-x*sin>
> > > Rotate z: <x,y,z> -> <x*cos-y*sin,y*cos+x*sin,z>
> >
> > This is just for left-handed systems BTW.
>
> Thanks a lot! Is there a difference between left and right-handed systems?
If you know what the graphs of sine and cosine look like, you can mimic the
rotations with your hand and it should be apparent where these formulas come
from.
For a left or right handed system, thumb pointing out is x, index finger
pointing straight is y, and middle finger pointing perpendicular to palm is z.
So swap y and z from the left-handed system and you get a right-handed system.
In either system, point your thumb along the axis of rotation and your fingers
will curl in the direction of rotation.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|