logo back up home forward   further reading more topics »

Maths - Quaternion to AxisAngle - Error Report

By: nobody ( Nobody/Anonymous )
Error in Quaternion to AxisAngle
2003-01-27 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
2003-01-27 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.

cover 3D Math Primer - Aimed at complete beginners to vector and matrix algebra.

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

cover Dark Basic Professional Edition - It is better to get this professional edition

cover This is a version of basic designed for building games, for example to rotate a cube you might do the following:
make object cube 1,100
for x=1 to 360
rotate object 1,x,x,0
next x

cover Game Programming with Darkbasic - book for above software

Can you help?

Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page.

 

progam

I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here:

http://sourceforge.net/projects/mjbworld/

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2008 Martin John Baker - All rights reserved.