Derivation of required math identities in quaternion notes
(v x p) . v = 0
(v x p) x v = (v . v) p - (v . p) v
Trigonometric half-angle identities
Quaternion to rotation matrix
Created by Mathematica (September 7, 2003)