Quaternions for Julia
using Pkg
Pkg.add("Quaternionic")
See the documentation for details.
The goal of this project is to build a complete quaternion type in Julia. There are several features that I consider to be fairly basic to a good quaternion package, including
- Subtypes for rotors and pure-vector quaternions, with corresponding specialized methods
- Numerous conversions to and from other representations of things quaternions can represent — especially rotations
- Smooth interpolation, and differentation of the interpolant
- Intelligent handling of distance measures
- Construction of random quaternions of the various special types
- Enabling efficient integration of angular velocity
- Construction of a minimal rotation
- Documentation
- Thorough testing
While there is a wide variety of implementations of quaternions in Julia, none of them tick all these boxes for me, and none seem easy to extend to do so. In particular, the most popular of those has made certain design choices that conflict with my needs.
I have plenty of experience programming quaternions (including this popular python package, and this newer and fancier package), so transferring that experience to Julia feels like the right thing to do.