>
> Lily,
>
> I need to rotate about an *object's* x,y, and z axes, rather than the
> coordinate system's axes.
If I understand you correctly, what you want is to place the object in
one coordinate system (call it A), then embed the coord into some
other coord (call it B). Then you can apply the rotation in coord A
only. I implement kinematic chains in this way (i.e., the embedding
is done by adding one transform as the child of another).
> Unless there is something that I am missing, I
> cannot rotate around x, y, and z simultaneously.
Maybe that is ithe problem...
Try the following:
take 3 random matrices that rotate about x, y, z axes, call them Rx, Ry, Rz
take the product, M = Rx*Ry*Rz
get the quaternion description of M , call it Q
get the AxisAngle description of Q, call it A
now you can create a transform3d using A that will do exactly the
same thing as rotating about Rx, Ry, Rz sequentially.
> 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".
>
===========================================================================
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".