Lily,

I need to rotate about an *object's* x,y, and z axes, rather than the
coordinate system's axes.  Unless there is something that I am missing, I
cannot rotate around x, y, and z simultaneously.  I first must rotate around
one axis, then around another, and finally the third.  As I said before, if
I perform the rotations in the order x, then y, then z, I have to account
for the y axis being rotated about the x axis, and the z axis being rotated
about the x axis and then about the y axis...

Evan

-----Original Message-----
From: Lily Lee <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, January 26, 2000 2:37 PM
Subject: Re: [JAVA3D] more vecmath questions...


>Evan,
>
>I don't understand the problem that you are describing.
>
>... and is there any reason that you are applying rotations about each
>axis sequencially?  If not, then the whole idea of using axisangle is
>to get a rotation about any arbitrary axis, such as [0.2, -0.4, 0.6],
>that does not even have to unit length, and any arbitrary angle.
>
>Lily Lee
>
>
>>
>> First of all thanks for your help, Lily Lee.  AxisAngle is the solution
to
>> rotating about an object's coordinate system rather than the absolute
>> coordinate system...
>>
>> However, I am still confused about something.  Let's assume I carry out
>> rotations about the x axis first, then about the transformed y axis, and
>> finally about the transformed z axis.  From my computer graphics text,
you
>> multiply the transformation matrix by your vector to get the transformed
>> vector.
>>
>> For example, the matrix for rotation about the x axis is:
>>
>> 1       0            0            0
>> 0       cos a    -sin a      0
>> 0       sin a     cos a      0
>> 0       0            0            1
>>
>> If I multiply this by the unit vector along the y axis, [ 0 1 0 1] T,
then I
>> get the vector [ 0 0 1 1 ] T, which is the unit vector along the z axis.
>> This conforms to the right handed coordinate system and makes sense.
What
>> doesn't make sense?
>>
>> Let's say that I rotate my object around the absolute X axis by some
>> arbitrary angle.  I then should be able to rotate the unit vector for the
Y
>> axis by the same angle (we'll call this rotated vector Y').  I can then
use
>> AxisAngle to rotate about Y'.
>>
>> However, the above doesn't work!  I have to multiply my Y unit vector by
the
>> X rotation matrix (instead of the other way around) to get this to work!
>> Things get even crazier when I try to obtain Z'!
>>
>> To get Z' I multiply the Z unit vector by the 3x3 rotation matrix of my Y
>> transform.  However, to get this to work, I have to negate the x
component
>> of the vector!
>>
>> Can anyone explain why this is the way it is done?
>>
>> Thanks,
>> Evan Drumwright
>>
>>
===========================================================================
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
>> of the message "signoff JAVA3D-INTEREST".  For general help, send email
to
>> [EMAIL PROTECTED] and include in the body of the message "help".
>>
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to