top | item 18368571

(no title)

lmitchell | 7 years ago

Thank you for posting this, I found it both very enlightening and a pretty fun internet-drama read :D

Interesting that the original complaint of that article/thread and this one are both the same - ie. quaternions are 'too hard to understand', and people 'use them without knowing how they work'. With this being posted so soon after https://news.ycombinator.com/item?id=18310788 , I feel like that complaint is less valid now than it ever has been, but it's kind of interesting to think about why quaternions in particular draw so much fire when, honestly, I found matrices to be equally challenging at first. Is it just an education thing, since matrices are generally taught much earlier? Or is there some intuition in matrices that isn't present in quaternions? Both of them seem to be just 'do this math, then magic happens' unless you think about them a fair bit, and that was pretty challenging for both the first time round imo.

discuss

order

Certhas|7 years ago

Matrices are linear transformations. Take a bunch of vectors, map them to another bunch of vectors. It's all inherently geometric.

The matrix:

  adg
  beh
  cfj
maps the vector (1,0,0) to the vector (a,b,c), (0,1,0) to (d,e,f), etc... so if you write any other vector as a weighted sum of (1,0,0), (0,1,0), etc... the weights get mapped to the new vectors.

As someone with a background in physics and geometry, it seems bizarre to me to use quaternions to reason about geometry. It's really unnatural. It's basically just a coincidence that the algebraic structure of rotations in 3d happens to look like this. It doesn't generalize to higher dimensions. There is no equivalent to quaternions for 4, 5, 6d [1].

Bivectors discussed in the article, on the other hand, easily generalize to higher dimensions, and are a completely natural geometric concept. (Of course if your thesis is about constructing 4d objects you care about that a whole lot more than if you build a 3d engine...)

Now that doesn't mean it's easier or harder to manipulate one or the other. As they all reference the same mathematical structure it's also not surprising that the code ends up being the same. And given that algebra is more natural for computers, I can see why quaternions might be useful here. But geometric they are not.

[1] https://en.wikipedia.org/wiki/Composition_algebra

wnkrshm|7 years ago

There is an N-dimensional generalisation for complex numbers, quaternions and hypercomplex numbers called Clifford algebra. I'm not an expert in that field (coming from physics and optics) but apparently it's not by chance that quaternions are connected with the rotation group SO(3) and complex numbers with SO(2). You can generalize to SO(n) with Clifford algebra.

marctenbosch|7 years ago

I think matrices are easier for people to visualize because they can think about them as a vector frame and coordinate transformations.

Quaternions are seen as this abstract 4D space somehow containing 3D space transformations, and people have a much harder time visualizing 4D space. I do not think spending a lot of time trying to visualize this 4D space, like this video does, is the right way to go. Rotors make that method obsolete.

jacobolus|7 years ago

To be honest the hardest part is not understanding single rotations, but understanding how rotations compose.

Thinking about a scalar + bivector as the quotient of two vectors or as the composition of two reflections is easy enough. But that still doesn’t yield a solid understanding of how rotation works – 3D rotation is subtle and tricky, even for people who have pretty good spatial reasoning and a lot of experience working with solid geometry / 3D design.

I have been thinking about the best interactive diagram(s) for giving people a good intuition about that for a long time, and I have some ideas but I still haven’t implemented anything and I’m not sure how well it will work.

gleed|7 years ago

[deleted]