Live data from Hacker News

Let's remove Quaternions from every 3D Engine

marctenbosch.com

31–40 of 184 posts

Re: Let's remove Quaternions from every 3D Engine

#31

Hmm, the word "interpolate" does not appear in the article. One of the main applications of quaternions in games is interpolating rotations. Does this representation interpolate well? Also, I've seen several articles trying to convince me that alternative transformation representations like these are better, but I haven't seen much code. Has anyone written a library using these concepts that could replace a tradition…

You can take the logarithm of a rotor in order to do interpolation. If you want a transformation represented by a rotor R to happen in N steps, you can apply R ^ (1/N) N times. The Nth root of R is exp(log(R)/N)

Re: Let's remove Quaternions from every 3D Engine

#32

I do love Geometric Albegra and hope it gets further adoption. In my field (physics), the project of moving to geometric algebra currently looks hopeless due to the inertia of other formalisms and lack of interest from established physicists. The real shame is that the best opportunity to introduce physicists to geometric algebra was a hundred years ago when we were first discovering spinors. First the Pauli algebra…

[deleted]

Re: Let's remove Quaternions from every 3D Engine

#33

Hmm, the word "interpolate" does not appear in the article. One of the main applications of quaternions in games is interpolating rotations. Does this representation interpolate well? Also, I've seen several articles trying to convince me that alternative transformation representations like these are better, but I haven't seen much code. Has anyone written a library using these concepts that could replace a tradition…

Yes, it does, because it is an identical representation to quaternions. Except it actually explains all the weirdness in quaternions without resorting to 4-space. This is because quaternions are a subalgebra of geometric algebra in 3-space.

Yes.

You can prove, for two rotors R1 and R2, that slerp(R1, R2, t) = R1 (R1^-1 R2)^t.

Re: Let's remove Quaternions from every 3D Engine

#34

Hmm, the word "interpolate" does not appear in the article. One of the main applications of quaternions in games is interpolating rotations. Does this representation interpolate well? Also, I've seen several articles trying to convince me that alternative transformation representations like these are better, but I haven't seen much code. Has anyone written a library using these concepts that could replace a tradition…

Yes, anything you can do on quaternions you can do on rotors. (Updated the article) I have not seen a clean version of the code online but it is almost the same as for a quaternion.

[deleted]

Re: Let's remove Quaternions from every 3D Engine

#35
post #31

Hmm, the word "interpolate" does not appear in the article. One of the main applications of quaternions in games is interpolating rotations. Does this representation interpolate well? Also, I've seen several articles trying to convince me that alternative transformation representations like these are better, but I haven't seen much code. Has anyone written a library using these concepts that could replace a tradition…

You can take the logarithm of a rotor in order to do interpolation. If you want a transformation represented by a rotor R to happen in N steps, you can apply R ^ (1/N) N times. The Nth root of R is exp(log(R)/N)

The same is true (with lower performance, I suspect) with the 3x3 matrix representation.

Re: Let's remove Quaternions from every 3D Engine

#36
When just implementing a first person type control/viewport I found it way easier to just use euler angles and the gimbal lock didn't really feel unnatural to me. So I think there is something to the idea that maybe you don't even need the complexity of quaternions at all dependent on the usecase.

Re: Let's remove Quaternions from every 3D Engine

#37
post #6

I don't quite understand why the author opposes quaternions and geometric algebra: the geometric product is almost exactly the formula for multiplying pure imaginary quaternions (up to the real part sign). These are just two constructions of isomorphic Clifford algebras which really are the same thing.

That's not true. The quaternions are the even subalgebra of the 3D geometric algebra. They are not isomorphic. Quaternions are isomorphic to the set of scalars and bivectors in the 3D geometric algebra but the 3D GA also has vectors and a volume form. This is just like how the complex numbers are isomorphic to the even subalgebra of the 2D geometric algebra. The geometric algebra is richer, more powerful, more genera…

I stand corrected, thanks a lot! It seems the article mostly deals with the scalar/bivector aspect of it though.

Re: Let's remove Quaternions from every 3D Engine

#38

I do love Geometric Albegra and hope it gets further adoption. In my field (physics), the project of moving to geometric algebra currently looks hopeless due to the inertia of other formalisms and lack of interest from established physicists. The real shame is that the best opportunity to introduce physicists to geometric algebra was a hundred years ago when we were first discovering spinors. First the Pauli algebra…

Do you think nature requires such an exotic representation?

Re: Let's remove Quaternions from every 3D Engine

#39
Texts on GA seem to start out saying "we're going to replace vector analysis with something intuitive and natural and eloquent and..." and then immediately introduce the "geometric product", which is neither intuitive, eloquent, or, as far as I can tell, natural. Its properties are found via formula-wrangling, and the results you get from it seem to just magically work, rather than being intuitive.

Bivectors in general are conceptually great; it's just the geometric product which I think is conceptually flimsy. And it's surprisingly hard to compute or make sense of the geometric product in general which is why the writer of the first book cited on the OP wrote "I do not think it possible to give a quick definition of the general geometric product."[1]

As far as I can tell 95% of the usefulness of geometric algebra is the usefulness of the wedge product ∧, which is absolutely under-appreciated and appears in loads of places in disguise (for instance, the determinant of a matrix is the wedge product of all of its rows or columns together).

The last 5% of the usefulness of GA comes from using the geometric product in vector-rotation via -ava^-1, which is admittedly very useful (it's why physics and computer graphics represent rotation this way, albeit in disguised forms like Pauli matrices and quaternions.) You can express that form without the geometric product, but I haven't found a way that strikes me as very elegant.

I don't mean to condemn GA - I think what it's doing is massively important. The mathematical language for vector analysis deficient compared to what we could be using, and a lot of things are more intuitive and natural in better language. I just suspect that the, uh, ideal form of this stuff will look slightly different than GA, and might not include the geometric product at all, but will definitely include the wedge product absolutely everywhere.

(I've spent a lot of free time trying to figure this out but I don't really have a compelling result yet. I've been meaning to try blogging about it, though, since it's basically my favorite thing to study.)

[1] https://math.stackexchange.com/questions/444988/looking-for-...

Post reply on HN