Well, guys, it's already been said that there is no way to do it, at
least not an easy way. Firstly, u can't extract rotation angles using
ONLY 4x4 matrix stored in Transform3D. Someone out here described the
principles of rotation matrix construction. The summary is that if u
do numerous rotations on some object, then in every cell of 3x3 matrix
multiples of cos and sin of all angles by which figure was ever
rotated by are stored. For instance, in a cell there could be THE
RESULT of the following operation:

cosX1*sinY1 + cosY2*sinX3*cosX4 + sinY3*cosX1*cosZ4 + sinZ2*cosX3*
........

Now, the only thing u really has and can consciously operate with is
the WHOLE 3x3 matrix. By multiplying an object (eg, a vector or a
point) to this matrix, the former gets rotated. Now, u can take a
vector (smth like (0, 0, 1) for instance) and multiply it by the
matrix. After the vector is rotated u can rotated it back to the
initial position by means of simple calculations and consequent calls
of Rot function made on each step and, thus, get the rotation angles
around each axis. (Just draw it on a paper and u'll
see how to do it). Rot function, as far
as i remember, first sets not only translation components of 4x4 matrix
to identity, but it also does it with Rotation 3x3 matrix as well, so
that Transform3D holds ONLY rotation around ONE axis (that is former
rotations are lost). That's why u'll first need to rotate some
Matrix3D and multiply it then my rotation matrix of Transform3D.

There are dozens of possible series of those Rotations, each of which
would be the right one. Again, refer to the letter posted here a week
or so ago. And once again, in general cases u would never be able to know by means
of WHAT rotation series the current rotation matrix had been gotten.

Possibly this would help u, possibly not.
vladimir
             -=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<

In your previous letter u wrote:
--------------------------------
ER> I was wondering if you ever got an answer to the question you posted to the
ER> list:

ER> "Is there a way to determine the exact rotation angles for each axes from a
ER> given Transform3D?"

ER> This seems to be a common issue and I am fighting with it now.


ER> ***********************************************************************
ER> Eric Reiss - http://www.sigda.acm.org/Eric/
ER> Email: [EMAIL PROTECTED]

ER> SIGDA Internet Server Manager - http://www.sigda.acm.org/

ER> Assistant Systems Manager - School of Engineering
ER> University of Pittsburgh
ER> ***********************************************************************

ER> ===========================================================================
ER> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
ER> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
ER> [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