AutoMovie API
    Preparing search index...

    Namespace distalTwistSwivelRange

    The swivels at which the mid segment of a chain that twists distally (a forearm) can take, inside its own twist range, the twist a requested end rotation leaves it, as breakpoints of the swivel and a closed-form test.

    The end joint cannot twist: its twist reads its fixed zero. With the mid segment twisted by r about its long axis u, the end joint's local rotation is rest^-1 T(u, -r) K(s), K(s) the requested rotation seen from the untwisted mid segment at swivel s, and its twist is the angle atan2(P, Q) of two components of T(u, -r) x(s), x(s) = K(s) e with e the end joint's flexion axis (solveDistalTwist states the reading). That twist stands at its zero where

    normal . T(u, -r) x(s) = 0   and   ahead . T(u, -r) x(s) > 0
    

    with normal and ahead the two fixed combinations of the end joint's rest-carried axes that the zero's sine and cosine give. The first is A + B cos r + C sin r = 0 in the twist (Rodrigues' formula), at most two twists, and the second keeps the one of them whose reading is the zero itself, not the zero plus a half turn. So every swivel asks one twist r*(s) of the mid segment, or none where |A| > hypot(B, C).

    K(s) is a fixed rotation, the swivel's turn about the root-to-target line, and another fixed rotation, so every component of x(s) is a + b cos s + c sin s, fitted exactly from three swivels. The twist asked reaches an end r0 of the range where (T(u, r0) normal) . x(s) = 0, a sinusoid of the swivel with at most two roots, and the twist stops existing where |u . x(s)| passes |normal across u| / |normal|, two more sinusoids. The root kept changes only where both components of the reading vanish, the twisted axis lying along normal x ahead, which needs |u . x(s)| = |u . (normal x ahead)| / |normal x ahead|, two more. Between two neighbouring breakpoints the twist asked stays inside the range or stays outside it, so one test at a point of an interval decides the whole interval (the joint-limit intervals of the swivel, Tolani, Goswami and Badler 2000, section 3.2).

    IProps
    IRange
    of