Swing-twist decomposition in Clifford algebra

The swing-twist decomposition is a standard routine in motion planning for humanoid limbs. In this paper the decomposition formulas are derived and discussed in terms of Clifford algebra. With the decomposition one can express an arbitrary spinor as a product of a twist-free spinor and a swing-free spinor (or vice-versa) in 3-dimensional Euclidean space. It is shown that in the derived decomposition formula the twist factor is a generalized projection of a spinor onto a vector in Clifford algebra. As a practical application of the introduced theory an optimized decomposition algorithm is proposed. It favourably compares to existing swing-twist decomposition implementations.