Just because multivectors are intuitively superior doesn't mean GA is a solved pedagogical solution to rotations. It is itself very strange and unintuitive. In particular there is no satisfying explanation for what the geometric product means that I'm aware of (and I have read more-or-less everything there is on the subject). Certain restrictions of the product have a geometric interpretation but the overall operation doesn't. The product tends to be introduced in a just-so way: look, an operation! How neat! But if you're a student who's already wondering "wtf is a quaternion and why does this work" you're not going to be much better off wondering "wtf is a geometric product and why does it work".
I happen to think that the superior pedagogical solution is to do away with the geometric product as well and just focus on rotations as an application of the exponential map [https://en.wikipedia.org/wiki/Exponential_map_(Lie_theory)]. That is, quaternions emerge like this:
1. apply rotations via the exponential map acting on rotation operators: e^(iB) = 1 + (iB) + (iB)^2/2! + ...
2. in a flash of insight, realize that rotating vectors with two half-rotations is more stable than one full rotation: e^(iB) v => e^(iB/2) v e^(-iB/2)
I don't really understand the point of (2). I remember hearing that it works better in higher dimensions but couldn't tell you why.
But the point is, the useful properties -- like avoiding gimbal lock -- follow from just oriented planes and the exponential map. Gimbal lock is avoided by expressing rotations as a single rotation around an arbitrary axis, instead of, say composing Euler angles around fixed axes. But you don't need to mention the geometric product anywhere for this.
Anyway I think that this is a relatively 'unsolved' space, pedagogically. There is probably a really good explanation of why this all works that feels like it is still missing and doesn't involve any magic handwaving steps at all.
To see what a plane does to a vector, you take the product: of course you start with basis vectors and then later show that everything composes linearly.
The very important thing here is that the geometric product should Not be taught as the sum of scalar and cross product. Geometric product is defined by rules on the basis vectors and by linearity!
Now, I admit that when you see that making actual rotations is not as straighforward as one would expect, it’s confusing, and a bit disappointing. But, I think one can believe that bivectors are about rotation somehow, and then go further to the more complex exponential thing.
Idk maybe it’s just personal preferences, i studied quite a bit of math at college, but i never studied quaternions, and now I’m just very glad I didn’t, since this is much better to me!
If you wanted to have state with pure functions, you would, according to DRY, be compelled to write the bind operator. You wouldn't have known to call it a monad or why some basement theoretician likens it to a burrtiofunctor, but you nevertheless would have made the obvious coding solution.
Is this possible for rotation without a PhD in geometry or algebra?
Here is a free book made for undergraduates that teaches in that manner that just assumes some elementary linear algebra; http://hades.mech.northwestern.edu/index.php/Modern_Robotics
IMHO, geometric algebra makes certain things clear, but it's also oversold as something new or novel. It can be recast in the language of differential forms (covariant multivectors) which is very often used in physics.
I did not really grasp what it meant but I did find the idea itself fascinating.
I think there is a certain 'magic' in not understanding certain concepts fully. It's probably why I like maths and heavily dislike physics and chemistry. I do not want to make sense of this world. I want to see "the volume of a sphere is 4/3PIr^3" and in some sense see it as an incantation that one would make when casting magic in an RPG. Once you take some calculus, it is a pretty easy formula to derive (integrate?), but there is an allure, an invitation to do some really interesting math just for itself. It fires up our inner curiosity, if you want.
So anyways, I am neither addressing the title's question nor would I really mind if quaternions were replaced in game engines, but I thought it was important to voice the opinion that sometimes it's ok to not understand something.
This doesn't make sense to me. Math are things that humans can understand fully, physics and chemistry are not, at least not yet. Things like "the volume of a sphere is 4/3PIr^3" can be fully understood, there are many ways to derive that formula. Of course you can apply it without understanding it, but the same goes for newtons equations or any of the many other formulas you have in physics and chemistry.
Most people who drive cars have no idea how a combustion engine works, but the world doesn't completely descend into anarchy because of this.
its like wondering how a hammer works instead of just using the hammer
> I think there is a certain 'magic' in not understanding certain concepts fully.
With magic everywhere I wonder how many lifetimes it would take to understand the things we use. And I wonder how much of our knowledge is, should, or must remain tacit[1].
And sometimes “surface explanations” kick off deep understandings that you can’t surface at once, or ever. Jordan Peterson tried rationalizing faith in this way, and it was quite a show[2].
[1] https://en.wikipedia.org/wiki/Tacit_knowledge
[2] https://youtube.com/playlist?list=PL22J3VaeABQD_IZs7y60I3lUr...
Particularly, I think this part is insightful:
> In 3D, a bivector has three coordinates, one per plane: (xy, xz, and yz). Vectors also have three coordinates, one per axis (x, y and z). Each plane is perpendicular to one axis. This is a coincidence that only happens in three dimensions and it is why historically we have been confusing bivectors with vectors.
This part is confusing to me; in any number of dimensions, your orthonormal basis vectors (coordinate vectors) will by definition have tangent vector spaces (planes). There's nothing special about 3 in this regard, unless I'm misunderstanding something.
I recommend every 3D engine keep quaternions - they work well for their task.
Here's [1] one example from the godfather of GA demonstrating how poorly GA performs
[1] https://webspace.science.uu.nl/~kreve101/asci/GAraytracer.pd...
It is another trick to map this to SIMD operations with vector units or GPUs in modern CPUs, but that should be no harder than doing the same thing with quaternions.
People have tried this for well over 20 years, and it has never once panned out. It's simply not possible, since the representation required for Clifford Algebras is simply larger than for a quat. C++ static typed engines with all the template magic, or even super optimized hand rolled GA engines, are simply not performant compared to the same effort on a traditional linear algebra one.
Look over the writings of the authors in the paper I linked - they're gods in the GA field, and they've tried for decades to get it to work, as have many others (I worked on it 20ish years ago too..).
Go ahead and reinvent it all. I suspect you'll eventually reach the same conclusion many have before.
Take the real numbers, for example. They are intuitively simple, but if you take an analysis class, you'll be asked to rigorously prove that your different approaches to understanding real numbers are equal to each other, and therefore interchangeable. You can take your axiomatic approach (real numbers are an ordered field, where each nonempty set bounded above has a least upper bound). You can construct real numbers as decimal numbers with an infinite number of digits past the decimal point. You can construct real numbers as limits of series of fractions. All of these approaches "are" the real numbers. No one version is privileged over the others. By understanding these different approaches, you get a better understanding of the real numbers.
Same is true of quaternions, but here, it seems that we're being sold an idea that one version is superior and the other versions are inferior. This is, I believe, a bad pedagogical approach. There are certain advantages to thinking of quaternions in terms of a scalar component and 3D imaginary component. For one thing, the imaginary component points in the direction of the axis of rotation! That's pretty handy, for visualizing quaternions as rotations. This article takes the viewpoint that there is no reason to think of quaternions as anything other than rotors and plane reflections--again, this is bad pedagogy, because people should be encouraged to think of mathematical objects in different ways, and use whichever way that they find convenient for the problem, or convenient for their own mental model. No one approach is privileged. As a mathematician, reading this article, all I see at the end is "Oh, you want to use quaternions, but you don't want to call them quaternions."
Perhaps we need a more in-depth article on the notion of rotations explained for non-mathematicians, something that, at the very least, incorporates the relationship between axis-angle representations and quaternions/rotors, because these two different representations are not isomorphic, and they are related to each other through calculus, the exponential map, and Lie algebra. It's also worthwhile to think what the tangent space is for unit quaternions. If you incorporate the different approaches to representing rotations, and don't try to sell one as being "the best" representation, I'd love to read that article.
Students should be encouraged to figure out what approach works for them. For example, if you’re multiplying 19x3, some students might think 19x3 = 30+9x3 = 30+27 = 57, and other students might think 19x3 = (20-1)x3 = 20x3-1x3 = 60-3 = 57.
Telling students that one of these ways is the way you SHOULD multiply—that’s bad pedagogy.
Knowing multiple approaches to solve the same problem is only something we really ask for math majors. It’s not something you’re expected to do until you get to topics like analysis or abstract algebra, where you’re asked to prove that different constructions have the same structure.
Let's remove quaternions from every 3D engine (2018) - https://news.ycombinator.com/item?id=22200260 - Jan 2020 (326 comments)
Let's remove Quaternions from every 3D Engine - https://news.ycombinator.com/item?id=18365433 - Nov 2018 (175 comments)
Mathematically, this isn't an unusual way to look at it; you can read the Wikipedia page on this way of representing rotations. The nice thing is that it works basically the same as a 2d rotation, you just have one more row and column in your matrix.
https://en.wikipedia.org/wiki/Rotation_matrix
I think this is simpler than any of quaternions, rotors, bivectors, or exponential maps.
The term dual-complex numbers is an unfortunate name for what I'm referring to, which is a 4D number system for representing rigid body motions of 2D space. There is an analogue of SLERP for them for interpolating between rigid body motions. So you would expect the answer to be yes.
Maybe this isn't the right forum for this question.
* - https://en.wikipedia.org/wiki/Dual-complex_number#:~:text=Th....
2D angles are represented by floats, and 3D angles are represented by Quaternions. Which is fine internally, but a smart language should provide an inline wrapper type.
Typing 2D angles as floats presents issues when wrapping: x and 2pi * x will look and mostly function the same, but can lead to edge cases e.g. comparisons and loss of precision.
Typing 3D angles makes them easier to understand, since you won't be doing high-level mathematical operations, you'll just be rotating to face x or rotating by y degrees perpendicular to vector z.
> in fact, they are isomorphic
> The change is simple and the code remains almost the same, but the understanding grows a lot.
Does that mean you could rename 'class Quaternion' to 'class Rotor' and be done? I watched the video on rotors and some other videos on quaternions and I found them exactly as unintuitive as each other. I don't really see any advantage to using rotors and I'm quite happy to continue treating quaternions as black boxes.
The article says that rotors are better since they can be generalized to any number of dimensions, unlike quaternions which only work in 3D. But that only seems useful to one person: Marc ten Bosch, the guy who writes games in 4D.
Quaternions - https://news.ycombinator.com/item?id=29510237