Thank you! Quat4f#normalize() seems to do the job! I have a class 'LocationData' that holds a Matrix4f for position and orientation and some Vector3f for velocity, angular velocity, acceleration and angular acceleration. This is somehow unsatisfying bc. I think position/velocity/acceleration should all have corresponding representation, as orientation/ang.vel./ang.acc.. But I have the matrix on the one hand, the vectors on the others.
Is there good (and mathematically correct) way to express change in orientation? dQuat/dt? dAxisAngle/dt? dMatrix3f/dt? So that I could use the same structure for all derivatives in time? Thx, - J ----- Original Message ----- From: "Sean Sylvis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 9:07 PM Subject: Re: [JAVA3D] Using Quat4f correctly The problem could be due to rotational shearing affects, although it looks like Java3D normalizes the matrix when getting and setting the rotation values. I would try normalizing the interpolated quaternion before setting the matrix and see if that helps: > data.position().get( mSrcOrientation ); > mLocData.position().get( mDstOrientation ); > mDstOrientation.interpolate( mSrcOrientation, dt / mTime ); -----> mDstOrientation.normalize(); > > data.position().setRotation( mDstOrientation ); As far as I know, the best way (in terms of results and efficiency) to interpolate between orientations is using quaternions. Is there any reason you are converting from matrices to quaternions (could you remove the use of matrices in this algorithm)? It seems like a good rule to try and minimize the number of data conversions in one's application. =========================================================================== 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".
