Not detracting from this post, but has anyone else noticed there's a front page post about Quaternions or Kalman filters on about a monthly cadence? Wonder why that is?
Rediscovering Quaternions
31–40 of 72 posts
Re: Rediscovering Quaternions
#32I also recently came across "Geometric Algebra", which seems like an idea of equipping a vector space with a formal anticommutative product. There seems to be a subset of people on the internet who swear by it.
Re: Rediscovering Quaternions
#33Not detracting from this post, but has anyone else noticed there's a front page post about Quaternions or Kalman filters on about a monthly cadence? Wonder why that is?
Because quaternions are so cool yet under-appreciated. Unfortunately not many octonion posts.
(Open access pdf: https://par.nsf.gov/servlets/purl/10098941)
Can you give some pointers to other interesting applications?
Re: Rediscovering Quaternions
#34I had a much simpler time just using rotation matrices for everything. They're not much more difficult to compose, they're trivial to apply to vectors, and they can be easily understood in terms of their row and column vectors. (For my project in particular, I really enjoyed the property of easily knowing which octants the basis vectors are mapped to.)
Where are the practical areas where quaternions shine? Are they just useful for the slerp operations that everyone points at, or are there other situations where they're better than rotation matrices?
Re: Rediscovering Quaternions
#35While they might be theoretically pleasing, I've had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, wh…
Re: Rediscovering Quaternions
#36While they might be theoretically pleasing, I've had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, wh…
Re: Rediscovering Quaternions
#37Not detracting from this post, but has anyone else noticed there's a front page post about Quaternions or Kalman filters on about a monthly cadence? Wonder why that is?
Re: Rediscovering Quaternions
#38While they might be theoretically pleasing, I've had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, wh…
Think of matrices as computational instructions, which are straightforward but lossy, while quaternions are the canonical "lossless representations".
The sweet spot for using quaternions is to use them as intermediate representations of rotation operations, then "compile" them down to a matrix once you are gonna apply it to a vector.
ijkl_as_matrix = {
(ll+ii)-(jj+kk), (ij+ji)-(lk+kl), (ki+ik)+(lj+jl),
(ij+ji)+(lk+kl), (ll+jj)-(kk+ii), (jk+kj)-(li+il),
(ki+ik)-(lj+jl), (jk+kj)+(li+il), (ll+kk)-(ii+jj),
};
(Keep in mind that unnormalized quaternion has uniform scaling, so if your quats are unnormalized then your matrix will also apply a scale factor of dot(q,q), so you should divide your final vertex coords by that factor.)---
[0] For an example, see https://old.reddit.com/gdd8op
Re: Rediscovering Quaternions
#39While they might be theoretically pleasing, I've had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, wh…
If you’re interested in seeing their approach, here’s the repo:
Re: Rediscovering Quaternions
#40While they might be theoretically pleasing, I've had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, wh…
Quaternions are automatically orthogonal, whereas matrices can shear and therefore may accumulate floating point distortions under repeated opreations.[0] Think of matrices as computational instructions, which are straightforward but lossy, while quaternions are the canonical "lossless representations". The sweet spot for using quaternions is to use them as intermediate representations of rotation operations, then "c…
(Luckily, for my project, I'm not particularly worried about error, since the only thing being rotated frequently is the camera, and microscopic scaling and shearing won't affect the result much. I measured the error in the basis vectors over time to make sure, and it just seems to be O(sqrt(t)) random-walk noise, not anything that compounds on itself.)
[0] https://www.tobynorris.com/work/prog/csharp/quatview/help/or...