Hi Joel,

    Bug 4422372 -
    Quad4f/Quad4d set(Matrix m) may initialize quad element to NaN

is filed for this. It is cause by numerical stability when
the rotation component of matrix is very close to zero
which should return quat(0,0,0,1).

Thanks.

- Kelvin
--------
Java 3D Team
Sun Microsystems Inc.

>X-Unix-From: [EMAIL PROTECTED]  Tue Mar  6 12:13:56 2001
>MIME-Version: 1.0
>Date: Tue, 6 Mar 2001 14:43:06 -0500
>From: "J. Lee Dixon" <[EMAIL PROTECTED]>
>Subject: [JAVA3D] AxisAngle4f to Matrix4f to Quat4f bug?
>Comments: cc: "Java3DBugReporting (E-mail)" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>
>While debugging a problem with my home-grown 3DS loader, I found
>something (wrong?) with going from AxisAngle to Matrix to Quats.
>
>3DS format stores rotations in AxisAngle format.  I use these to load a
>Matrix so I can "sum-up" rotations (using matrix multiplies of course).
>Then, I set a Quat with the Matrix since the TCB interpolators take
>Quats.  After getting some Quats set to (NaN, NaN, NaN, NaN), I did some
>playing and got some example code to replicate the problem.
>
>This example code creates an AxisAngle4f to perform 90deg rotation about
>the Z axis.  I then create two Matrix4f objects with this same AxisAngle
>object, and then multiply the matrices together to get a Matrix4f that
>should do a 180deg Z-rotation.
>
>Using this final matrix to set a Quat4f gives me the NaN result.  If I
>use AxisAngle4d instead of AxisAngle4f and remove the (float) typecast
>in front of the Math.PI*0.5, the example code works.
>
>The code is attached.  Here's the output:
>
>mat1=
>-4.371139E-8, -1.0, 0.0, 0.0
>1.0, -4.371139E-8, 0.0, 0.0
>0.0, 0.0, 0.99999994, 0.0
>0.0, 0.0, 0.0, 1.0
>
>mat2=
>-4.371139E-8, -1.0, 0.0, 0.0
>1.0, -4.371139E-8, 0.0, 0.0
>0.0, 0.0, 0.99999994, 0.0
>0.0, 0.0, 0.0, 1.0
>
>mat1 * mat2=
>-1.0, 8.742278E-8, 0.0, 0.0
>-8.742278E-8, -1.0, 0.0, 0.0
>0.0, 0.0, 0.9999999, 0.0
>0.0, 0.0, 0.0, 1.0
>
>quat=(NaN, NaN, NaN, NaN)
>
>J. Lee Dixon
>SAIC - Celebration, FL
>321-939-7917
>[EMAIL PROTECTED]    AOL: LeeOrlando
>

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