All you need to know is the meaning of the 4 values.
A quaternion is made of 4 values (x, y, z, w) .
To define a rotation around a unitary vector u, for example (0,1,0) =>Y axis,
and an rotation w=60º, your code should look something like this.

        x = u(x) * sin(w / 2) = 0
        y = u(y) * sin(w / 2) = 0.5
        z = u(z) * sin(w / 2) = 0
        w = cos(w / 2) = 0.8660...

 Take a look at the RotPosPathApp example in the Getting Started tutorial from
SUN.

  I know it's hard to figure out how it works, someone told me too (gracias
Dani).

Siau Tan Long wrote:

> How to use quaternion to do rotation about an arbitrary axis in Java3D?
> e.g: Quat4f
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> ===========================================================================
> 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