If you find yourself needing to rotate a point in three-dimensional space about an arbitrary axis, one approach is to use Euler angles and rotation matrices. This method comes with a few drawbacks, though - it's not easy to invert, for one thing, and gimbal lock for another.
Quaternion rotations do not suffer from either of these drawbacks. This quaternion library, in .lvlib file format, includes the following:
- Standard basic four arithmetic functions
- The spherical linear interpolation function (SLERP)
- Rotation about an arbitrary axis.
Complete the form to download the quaternion library.