Skip to main content
GameDev.net gamedev.net
🔒 Locked

Do We Really Need Quaternions?

Started by Myopic Rhino Feb 18, 2001 at 7:57 AM 15 replies 4k views
Myopic Rhino
Myopic Rhino
Okay, did this article get mentioned somewhere today or something? I think it''s been discussed ad nauseam elsewhere in the forums.
Zipster
Zipster
Quote:
why go through all the trouble of creating some unique vector space, and map to and from it when our old friends the sine and cosine work just as well?

It happens all the time. The complex number space in particular is actually extremely useful and applicable. System engineers for example use Laplace transformations to transform functions of the single variable time into a complex number space in order to more easily deal with dynamic systems. Once they've done their manipulations they do an inverse transform to get back into the time space. The alternative is to solve complicated differential equations, which is something that mathematicians might enjoy but engineers surely do not.

Another example of transformations making life easier is something as simple as logarithms, which transform numbers into logarithmic space so they can more easily multiplied and divided (multiplication turns into addition, division into subtraction, exponentiation into multiplication, et cetera). The central idea is that you transform something into a form that's more condense and easier to manipulate, and then transform it back into it's native space when you're finished. You incur the "cost" of transformation but in many cases it's nothing compared to the work you'd have to do in the native space. Maybe matrices aren't the best examples of something that's too difficult to work with natively, however you'll notice that quaternions solve a lot of stability issues association with matrix transformations (like gimbal lock).
meeshoo
meeshoo
well, yes we do. from all the articles regarding quaternions, there is a demonstration that is superios (in CPU usage) to matrix ops, and their interpolation ability makes it very useful in a lot of cases (but not all of them). Their implementation should be very easy on a modern GPU as well. That's my opinion
Dmytry
Dmytry
Quote:
Original post by Anonymous Poster
Diana's article makes a lot of sense to me ... why go through all the trouble of creating some unique vector space, and map to and from it when our old friends the sine and cosine work just as well? Quaternions seem like just another subject that takes time to learn; that time could be better allocated elsewhere.

Dave Kopp

It's not quaternions are taking time to learn, it's 3d rotations takes time to learn.

As about axis and angle. 99.99% of time, we don't need angle itself, we need sine or cosine of angle or even more often, half-angle. And sine and cosine of half angle is storen inside quaternion.

If we are working with axis and angle, when combining rotation, we compute sine and cosine, then we compute arcsine and arccosine, then again and again. It's just plain stupid to calculate arcsine to find angle , so then you'll use sine to find what you really need. It's just like vectors versus angle and length

And if you can understand how axis-and-angle rotations is combined, you should be able to understand quaternions as well. Really, write down quaternion multiplication side-to-side with combination of axis-and-angle rotations. What one will be more complex?

Heck, quaternions was invented before vectors or matrices. How them can be really "much more complicated"?
Lode
Lode
Quote:
Original post by Myopic Rhino
Okay, did this article get mentioned somewhere today or something? I think it''s been discussed ad nauseam elsewhere in the forums.


Has it been? Where? I was really interested to see all possible comments about this article, because I want to know what the general stance of quaternions vs matrices is.
Gage64
Gage64
Quote:
Original post by Lode
Quote:
Original post by Myopic Rhino
Okay, did this article get mentioned somewhere today or something? I think it''s been discussed ad nauseam elsewhere in the forums.


Has it been? Where? I was really interested to see all possible comments about this article, because I want to know what the general stance of quaternions vs matrices is.


I think he was talking about this thread, as there's a link to it at the top of the article.
taby
taby
The author tries to strike a balance against quaternion mania, which is respectable. As is their initiative to familiarize others with this quasi-"mystical" subject.

However, the author incorrectly claims that quaternion multiplication is unwieldy. This immediately calls into question exactly how deep their knowledge of the subject is. Quaternion multiplication is not unwieldy; beyond grade school arithmetic, it requires only two "complicated" operations that are familiar to anyone with 1st year linear algebra under their belt. The author's lack of objectivity smacks of sensationalism, because there is really no controversy to be found here.

For the author's reference: http://world.std.com/~sweetser/quaternions/intro/tools/tools.html

Where Qn represents a quaternion, a lowercase letter indicates a single scalar, and an uppercase letter indicates a 3-vector:
Q1 = (t, V)
Q2 = (t', V')
Q1 Q2 = (t t' - V dot V', t V' + t' V + V cross V')

Here dot is the well-known 3D dot product operation (resulting in a scalar), and cross is the well-known 3D cross product operation (resulting in a 3-vector). It's incredibly simple, and just so happens to be deeply related to vector algebra.

For the record, I haven't been developing games since the dawn of time, and I couldn't give a rat's ass about university. Never been there, never will. In fact, it was only three years ago that jyk taught me the basics of linear algebra. That said, I'd be more than happy to tutor the author on higher-dimensional division algebras, Lie groups, etc. at no cost. I'm being sarcastic, but it sounds kind of sensationalist/rude when it's put that way, now doesn't it? :)

[Edited by - taby on July 31, 2009 11:09:27 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.