Quaternions
61–70 of 118 posts
Re: Quaternions
#62In my opinion, Geometric Algebra and bivectors ( https://bivector.net ) in particular is a much better (both practically and pedagogically) approach compared to quaternions and significantly more elegant. It's a real shame that people continue to focus so much on quaternions in this day and age.
No really, unit quaternions are nice because it's pretty clear they belong to a sphere, therefore you can fairly easily extend geometric methods on the usual sphere to perform filtering, averaging, interpolation etc on rotations.
With GA it's not so obvious.
Re: Quaternions
#63Let's remove Quaternions from every 3D Engine (2018) - https://news.ycombinator.com/item?id=29512302
Re: Quaternions
#64I've been out of the games sphere for a long time, but is slerp() really the default idiomatic interpolation approach in modern games nowadays? There are a vanishingly small number of scenarios where lerp() + normalize() doesn't work perfectly well enough and it is drastically faster and SIMD-friendly. That used to be the case at least.
The amount that it matters depends on the angle between keys. Suggesting it rarely matters means you’re claiming nobody ever animates large angles, which I can confidently say I’ve seen plenty of counter-examples in game development.
I also wouldn’t be so sure that lerp+normalize is that much faster on today’s GPUs. Normalize takes a sqrt and reciprocal or divide, while slerp takes a few sin evaluations and a recip or divide. These special functions these days execute in a separate pipeline from linear (FMA) type instructions, and can be had for “free” as long as you can mix enough independent linear math in between the special functions. It used to be that sin() was very slow, but these days you can often mix a couple calls in without affecting your perf at all.
Re: Quaternions
#65Earlier quoted context omitted.
> Quaternions are hypercomplex numbers of the form I'm gonna guess "hypercomplex" means "involves imaginary numbers" due to the rest of this. > Where w, x, y, and z are real and i^2 = j^2 = k^2 = -1 and ij = k, ji = -k, jk = i, kj = -i, ki = j, ik = -j. Why even use different letters for i, j, and k, if they're all the same thing? Which thing appears to be i, as in, the square root of -1, that is to say, the most wel…
No, i, j, and k are not the same thing. They are the three distinct square roots of -1. You thus wind up with a space with one real axis and three orthogonal imaginary axes. Why should -1 have three distinct imaginary roots? Well, why should it have one? Essentially, we just made up i, and we found out that the complex numbers had some really useful algebraic properties. The same is true of the quaternions. But why n…
Re: Quaternions
#66I remember the first time I encountered quaternions, and it was in a similar context. I was using PiQT 3d to move models in a simulation. At first it really bothered me that quaternions were a black box to me, yet so easy to use in so many contexts. What kind of magic was happening? I had to know. My math is terrible. I spent actual days revisiting YouTube videos explaining quaternions but my limited brain cells were…
Re: Quaternions
#67I first encountered quaternions in the concept of abstract algebra. It's interesting to think of it as part of a spectrum starting with reals and continuing to octonions (and beyond). Interestingly with each extension we lose something: Complex numbers (2-dimensional): No more ordering Quaternions (4-dimensional): No more commutative multiplication Octonions (8-dimensional): No more associative multiplication Sedenio…
https://nautil.us/blog/the-strange-numbers-that-birthed-mode...
"Place your phone face-up on a flat surface, for example. Spin it 90 degrees to the left, and then flip it away from you. Note which way the camera points.
Returning to the original position, flip it away from you first and then turn it to the left second. See how the camera points to the right instead?
This initially alarming property, known as non-commutativity, turns out to be a feature the quaternions share with reality "
Re: Quaternions
#68W.R Hamilton's discovery of the Quaternions is semi-famous itself, with the story being that after the critical flash of insight he carved the equation describing quaternion multiplication into a bridge in Ireland with a penknife. A interesting read is this letter [0] written the following day, where he explains his ideas in his own words. It's a great (and accessible!) look into his thought process. [0] https://www.…
The story goes that he was with his wife going to a dinner. On the way he got the flash of insight after years of working on the problem but he had no paper to write it down. When passing a bridge, he carved the equation on the side of the bridge to remind himself on the way back after the dinner.
Re: Quaternions
#69I first encountered quaternions in the concept of abstract algebra. It's interesting to think of it as part of a spectrum starting with reals and continuing to octonions (and beyond). Interestingly with each extension we lose something: Complex numbers (2-dimensional): No more ordering Quaternions (4-dimensional): No more commutative multiplication Octonions (8-dimensional): No more associative multiplication Sedenio…
[1] https://projecteuclid.org/journals/pacific-journal-of-mathem...
Re: Quaternions
#70I know that I am not coming in with same perspective as a lot of the other software engineers/graphics developers, but I started learning about quaternions freshman year of college. For aerospace engineering quaternions are used almost exclusively for spacecraft attitude determination and control. For a very dynamic system they are very useful.
There are some limitations that I have seen, and I have seen Rodrigues parameters (or modified Rodrigues parameters) used instead which are mentioned near the end of the article.