The joint and the rotation demanded of it by swivel.
The joint's clinical basis, admitted and normalized (normalizeJointAxes).
The joint's resolved range of motion; an axis with a null interval is immobile at its clinical zero.
Optionalframe?: IAutoMovieRestFrameThe rest frame lifting the joint's rest-relative angles to clinical ones; omitted, they are clinical.
The bone-local rotation demanded of the joint at a swivel, degrees: a fixed rotation turned about a fixed axis by the swivel.
The candidate swivels, degrees in [0, 360), none when the axis never reads neutral; null when the joint has no range, a swing-twist gate, or not exactly one immobile axis, so this analysis does not apply.
The swivels at which a joint with one immobile axis can take the rotation asked of it, in closed form.
A joint whose range leaves one clinical axis immobile (an ankle's axial twist) has two degrees of freedom, so of a requested three-degree rotation the chain's swivel must supply the third: the joint takes the rotation exactly only where the rotation demanded of it reads that axis at its neutral. For a demanded rotation that is a fixed rotation turned about a fixed axis by the swivel, the reading is a sinusoid's root (
swivelJointReadings): the middle angleasin(s)is neutral wheres - sin nvanishes, and an outer angleatan2(y, x)is neutral, in the principal chart or the alternate one a half turn on, wherey cos n - x sin nvanishes. There are at most two such swivels (swivelArcs.roots), Tolani, Goswami and Badler's analytic treatment of a joint limit as a function of the swivel (2000, Graphical Models 62).The roots are candidates, not certificates: the joint's two free axes may still lie outside their intervals there, and a reading inside the decomposition's gimbal band is pinned instead, so the caller scores each and keeps a candidate only when its own measure finds the rotation met.