Quaternion transform method only works with normalized quaternions
See original GitHub issueThe Quaternion method transform
requires the quaternion to be normalized, but this is not documented.
There is a better method here, which works with unnormalized quaternions, but also avoids the sqrt (see the Java code):
https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/index.htm
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Quaternion and normalization - Stack Overflow
Normalization is a kludge to drag the quaternion back to the unit 3-sphere. The reason quaternions drift off the manifold is because that...
Read more >Maths -Quaternion Transforms - Martin Baker - EuclideanSpace
First we convert the 3D vector into a quaternion, to do this we set the imaginary parts of the quaternion to the x,y...
Read more >Normalizing a quaternion - Mathematics Stack Exchange
I already know: The normalized quaternion is called unit quaternion and can be calculated in this way: Uq=q||q||.
Read more >Quaternions and spatial rotation - Wikipedia
Quaternions give a simple way to encode this axis–angle representation in four numbers, and can be used to apply (calculate) the corresponding rotation...
Read more >Quaternions∗ - Iowa State University
A quaternion is a 4-tuple, which is a more concise representation than a rotation matrix. Its geo- metric meaning is also more obvious...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A new 1.9.21-SNAPSHOT build is up on oss.sonatype.org with a Quaternion.transformUnit() (which works like the old Quaternion.transform()) and a modified Quaternion.transform() which works with non-unit quaternions as well.
Unlikely. Object sizes are padded for 8-byte alignment anyways. Currently, on a JDK-14, a Quaternionf instance takes 32 bytes and a padding of 4 bytes (according to JOL). Adding an additional byte makes no difference to the size.