2 ms·
I could have sworn that quaternion transforms were still 4x4 matrices, but I think that's just because quaternions themselves are representable as 4x4 real matr
by andrewflnr 9y ago
I could have sworn that quaternion transforms were still 4x4 matrices, but I think that's just because quaternions themselves are representable as 4x4 real matrices, which are computationally convenient. https://en.wikipedia.org/wiki/Quaternion#Matrix_representations https://en.wikipedia.org/wiki/Quaternion#Matrix_representati...
- deleted 9y ago[deleted]
- jacobolus 9y agoQuaternions are a 4-parameter representation of a rotation + scaling operator, the analog of using a complex number to represent rotation + scaling in the plane. You can convert a (4 parameter) quaternion to a (9 parameter) 3x3 matrix in a similar way that you can convert a (2 parameter) complex number to a (4 parameter) 2x2 matrix. In either case you aren't using the full parameter space of the matrices. In general in programs quaternions are used for storing and manipulating rotation operators (e.g. composing them together, etc.) because it saves work and improves numerical stability, but then final application of the rotation to a gigantic list of vectors is done using a matrix, because matrix-vector multiplication is very efficient (only need 9 multiplications and 6 additions to multiply a 3x3 matrix by a 3-element vector).