Quaternions. Here we implement rotations using Hamilton's quaternion representation. Quaternions are a particularly natural way to represent arbitrary rotations in three-dimensional space.