Quaternion (hypercomplex number) This implementation of quaternions is not complete; only the features needed for representing rotation matrices by quaternions are implemented. Constructor: - Quaternion(|q0|, |q1|, |q2|, |q3|) (from four real components) - Quaternion(|q|) (from a sequence containing the four components) Quaternions support addition, subtraction, and multiplication, as well as multiplication and division by scalars. Division by quaternions is not provided, because quaternion multiplication is not associative. Use multiplication by the inverse instead. The four components can be extracted by indexing.
Public Member Functions
Static Public Attributes
|int||is_quaternion = 1|
Static Private Attributes
|tuple||_matrix = Numeric.zeros((4,4,4))|
|tuple||_rot = Numeric.zeros((3,3,4,4))|