The range of a ball joint read by swing and twist: where the limb's long
axis may point, and how far the limb may turn about it.
A joint rotation q, rest-relative in the bone's own frame, splits into a twist about its rest axis u (the joint's twist axis) taken first and a swing, the shortest turn carrying u to the limb's direction q u. The twist is that turn's angle about u, lifted to clinical degrees by the rest frame's twist map. Decomposition is singular only where the limb points at -u, the rest direction's antipode.
Swing is limited by directions the constraint's flexion/abduction intervals reach with no twist (and swingDeg, when present), taken as a star about rest: every direction between rest and a reached direction along their great circle. A three-angle chart pinches where two angles turn about one axis (a hip flexed 90 degrees, where abduction turns the thigh about itself); the star fills that pinch so the flexed hip may swing aside. Its radius is stored on swingTwistBasis.RAYS great circles leaving rest: the farthest reached swing, raised where its azimuth slope exceeds SLOPE (beside a ray-aligned edge with a jumping farthest reach), then linearly interpolated between rays. Outside directions return along their own great circle to that radius, continuously because the radius is continuous.
Twist is clamped to the constraint's swingTwist.twist interval. A circle-to-arc clamp must break somewhere: here at the turn farthest from the interval on either side, which no limb reaches.
The construction is this module's; no published method is claimed for it.
The range of a ball joint read by swing and twist: where the limb's long axis may point, and how far the limb may turn about it.
A joint rotation q, rest-relative in the bone's own frame, splits into a twist about its rest axis u (the joint's twist axis) taken first and a swing, the shortest turn carrying u to the limb's direction q u. The twist is that turn's angle about u, lifted to clinical degrees by the rest frame's twist map. Decomposition is singular only where the limb points at -u, the rest direction's antipode.
Swing is limited by directions the constraint's flexion/abduction intervals reach with no twist (and swingDeg, when present), taken as a star about rest: every direction between rest and a reached direction along their great circle. A three-angle chart pinches where two angles turn about one axis (a hip flexed 90 degrees, where abduction turns the thigh about itself); the star fills that pinch so the flexed hip may swing aside. Its radius is stored on swingTwistBasis.RAYS great circles leaving rest: the farthest reached swing, raised where its azimuth slope exceeds SLOPE (beside a ray-aligned edge with a jumping farthest reach), then linearly interpolated between rays. Outside directions return along their own great circle to that radius, continuously because the radius is continuous.
Twist is clamped to the constraint's swingTwist.twist interval. A circle-to-arc clamp must break somewhere: here at the turn farthest from the interval on either side, which no limb reaches.
The construction is this module's; no published method is claimed for it.