Title: Message
There is obviously no difference since you're still using quaternions like euler angles. In other words, as long as you use pitch/yaw/roll you're always have gimbal locks, regardless of what intermediate transformations you use. If you don't want gimbal locks, just stop using them.
 
Cheers,
 
Florin
-----Ursprüngliche Nachricht-----
Von: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]Im Auftrag von Cavill, SA (Stuart)
Gesendet: Mittwoch, 25. August 2004 15:19
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] Gimbal lock

Hi,
I'm having problems with Gimbal Lock in my JAVA 3D code ( all I need to do is rotate a simple cube in 3 dimensions).
I initially used
 
transx.rotX(anglex);
transy.rotX(angley);
transz.rotX(anglez);
trans4m.set(transx);
trans4m.mul(transy);
trans4m.mul(transz);
transformGroup.setTransform(trans4m);
 
which caused gimbal lock
 
I then tried to use
public Quat4f setQ(float pitch, float yaw, float roll)
{
  Quat4f qx =new Quat4f((float) Math.cos(pitch/2f),(float)Math.sin(pitch/2f),0,0);
  Quat4f qy =new Quat4f((float) Math.cos(yaw/2f),0,(float)Math.sin(yaw/2f),0);
  Quat4f qz =new Quat4f((float) Math.cos(roll/2f),0,0,(float)Math.sin(roll/2f));
  Quat4f qt =new Quat4f();
  qt.set(qx);
  qt.mul(qy);
  qt.mul(qz);
  return(qt);
 
}
trans4m.set(q2);
transformGroup.setTransform(trans4m);
 
but again gimbal lock occurred.
 
I would appreciate any comments on what I am doing wrong or seeing an example of the correct way to go about this problem without gimbal lock occurring.
Any help would be greatly appreciated.
 
regards
 
 
Stuart Cavill
email: S[EMAIL PROTECTED]
 

 
=========================================================================== 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