AutoMovie API
    Preparing search index...

    Function swingTwist

    • Split a rotation into a twist about a given axis and the swing that is left, q = swing * twist, the swing-twist decomposition.

      The twist is the rotation's vector part projected on the axis together with its scalar part, renormalised (Dobrowolski 2015, "Swing-twist decomposition in Clifford algebra", arXiv:1506.05481), and the swing is q * twist^-1, a rotation whose axis is perpendicular to the given one. When the rotation is a half turn about an axis perpendicular to the given one, the projection vanishes and the twist is undefined; this returns the identity twist and the whole rotation as swing, the convention the joint code relies on, since any twist then gives the same swing magnitude.

      Parameters

      Returns IAutoMovieSwingTwist.IResult

      The swing and the twist, unit quaternions with rotation = swing * twist.