Re: [Plib-devel] Quaternions in plib
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-11 08:42:29
|
Sam Stickland wrote: > Quaternions have the > advantage that they don't need to be reorthoganised _ever_, ...but they *do* have to be renormalized - and in theory, that's just as arbitary as orthoganalization. > ...and from my > prespective four floats is a damn site better than twelve for network > transmission (OK, so it's a naive implementation - you could get away with > transmitting a single unsigned int if you used a lookup table. Again > quaternions would be quicker to lookup). * For 3D rotation only, you only need nine floats to send a matrix - and for a quaternion, you only need to send three floats plus a sign bit. Of course, Eulers only need three floats - so in terms of network bandwidth, they beat Quaternions by over 1% ! :-) * Comparing a 4x4 matrix to a quaternion isn't fair. A matrix can to a heck of a lot more than a quaternion - translation, scaling, perspective, shearing, projection onto an arbitary plane, *and* rotation. Quaternions can only do the latter. * Multiplying matrices together is faster than quaternions despite the larger number of terms because the math is simpler. * Transforming vertices using a Quaternion is a *nightmare* compared to using a matrix. * Quaternions score for interpolation, extrapolation and so forth. Quaternions have their place - so do Matrices *and* Eulers...I have rather a soft-spot for Quaternions - and what other mathematical entity every had a bridge erected in honor of it's multiplication rule? -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |