My quaternion to matrix function is broken..

Started by
2 comments, last by monkeyman 22 years, 5 months ago
and my matrix to quaternion function is probably broken too.. I''ve looked around and can''t find much info on converting quaternions to matrices and back..I''ve got some basic functions, but they seem to fail with certain quaternions..some quaternions I can convert back and forth all day and retain accuracy, and some of them will be different everytime.. I''ve heard of some special case that must be handled when dealing with quaternions, but I don''t know what it is, and my code certainly doesn''t handle any special cases..I''ve found a few references to it, but no clear definition of what must be done to get around it.. I can post my code if anyone asks, but I''m pretty sure the problem is in this "special case" I keep hearing about, and if you''ve ever had to deal with it you''ll know exactly what I''m talking about and can enlighten me.. "Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
Advertisement
Allegro contains quaternion functions (but make sure you get the WIP, not the latest official release ). Maybe you could compare yours against them. Here is the link to Allegro:

http://alleg.sf.net/

Here is a link to the source file you want on SourceForge's CVS browser:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/alleg/allegro/src/quat.c?rev=1.3&content-type=text/vnd.viewcvs-markup

And no, Allegro is not a "DOS blitting library" any more

Edited by - entheh on November 19, 2001 2:07:17 PM
Try this page: http://skal.planet-d.net/demo/matrixfaq.htm

[Resist Windows XP''s Invasive Production Activation Technology!]
Aha!

I have learned that numerically dissimilar quaternions can still result in similar transformations.

My quaternions do appear to be correct, which is much worse because it means I have deeper problems in my code

btw I see allegro has REALLY expanded since the last time I played with it..have to take a deeper look when I get home..

Thanks All!!

"Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."

This topic is closed to new replies.

Advertisement