By: nobody ( Nobody/Anonymous )
Error in Quaternion to AxisAngle
20030127 15:25
Hi,
I think that you have an error in you Quaternion to AxisAngle derivation... Your code is right, but in the derivation, you are not doing the samething as in the proof! :(
I think the bug came from the page AxisAngle to Quaternion... where the code is wrong (at least, if you look at your definition of quaternions)!! You should have ('multiply s' instead of 'divide by s'):
double s = Math.sin(a1.angle/2);
x = a1.x * s; y = a1.y * s; z = a1.z * s; w = Math.cos(a1.angle/2);
Alexis
By: martinbaker ( Martin Baker )
RE: Error in Quaternion to AxisAngle
20030127 16:53
Alexis,
Thank you very much for letting me know about this, I have corrected it as you suggested.
Martin
metadata block 

see also: 

Correspondence about this page  
Book Shop  Further reading. Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them. 
3D Math Primer  Aimed at complete beginners to vector and matrix algebra. 
This site may have errors. Don't use for critical systems.
Copyright (c) 19982023 Martin John Baker  All rights reserved  privacy policy.