Rotations.jl
Rotations.jl copied to clipboard
Add `QuatQuatRotation <: Rotation{4}`
I don't think the name QuatQuatRotation is appropriate, but I would like to add a new 4D rotation struct with two quaternions. (SO(4) is doubly covered by SU(2) × SU(2))
- https://en.wikipedia.org/wiki/Orthogonal_group#Low-dimensional_topology
- https://math.stackexchange.com/questions/3646/recovering-the-two-su2-matrices-from-so4-matrix
You might be interested in what CliffordNumbers.jl can do here. Rotations in N dimensions can be described with rotors in a geometric algebra, and those are representable with an EvenCliffordNumber{VGA(N)}. These can even be constructed from a KVector{2,VGA(N)} (a bivector representing the plane of a rotation) through exponentiation - the angle is encoded in the bivector scale.
When N === 2, the resulting type is isomorphic to complex numbers, and when N === 3 the type is isomorphic to quaternions. However, it doesn't follow a Cayley-Dickinson construction beyond that, so the N === 4 case is not isomorphic to octonions.
The implementation is a little different from Complex or Quaternion (for instance, the behavior of ' does not match conj) and my package is pretty new, so I understand if you're reluctant to add it as a dependency. But I figure a rotor-based rotation implementation for arbitrary dimensions may be of interest, and I'd like for the packages to be interoperable in the future!