Expand description
Arc length along any evaluable curve and its inverse, and arc-length
chains (#239), re-exported on the same footing as curve and surface.
Evaluation of arc-length chains (Chain2).
A chain’s parameter is cumulative arc length. Each piece is evaluated in its own local frame and placed rigidly at the end of the one before it, so reading a point resolves every earlier piece’s end first:
- an
ChainPiece2::Intrinsicpiece throughintrinsic_pointandintrinsic_tangent: heading exact, position Gauss-Legendre quadrature, as forCurve2::Intrinsic; - a
ChainPiece2::Parametricpiece through the arc-length inverse ofcrate::arc_parameter: the curve parameter whose arc length fromstartis the distance asked for, toARC_LENGTH_TOLERANCErelative.
§Accuracy contract
A point at distance s is the exact chain’s point at a distance within
ARC_LENGTH_TOLERANCE * max(1, piece length) of s on each parametric
piece it crosses, and within the intrinsic quadrature’s accuracy on each
intrinsic piece (machine precision on the closed forms it is pinned
against, ADR 0060). The tangent is the exact unit tangent at that point:
a parametric curve’s derivative or an intrinsic piece’s closed-form
heading. Positions after a parametric piece carry its end error, rotated
by the remaining placement; nothing is re-fitted.
§Refused by name
A malformed chain (no pieces, a non-finite or degenerate start frame, a
non-finite or non-positive length, a malformed curvature law), a
parametric piece that does not start at its local origin with tangent
+x within PIECE_FRAME_TOLERANCE, a piece longer than its curve
(named with the arc length available), and a distance outside
[0, length].
Constants§
- PIECE_
FRAME_ TOLERANCE - How far a parametric piece’s curve may sit from its local frame at its
start parameter:
PIECE_FRAME_TOLERANCE * max(1, length)from the origin, andPIECE_FRAME_TOLERANCEradians from+x.
Functions§
- chain_
certifies - Whether
crate::curve::flatten2certifies a chain’s chords: every intrinsic piece’s curvature is bounded and every parametric piece’s curve is a certified family with no corner anywhere in its domain (#232). - chain_
chord_ bound - Certified chord bound of a chain over arc lengths
[a, b]inside one piece (#232);Noneacross a join, for a span outside the chain, a piece whose curve has no certified bound, or a chain that does not evaluate. - chain_
point - Point on a chain at arc length
sfrom its start. See the module documentation for the accuracy contract and refusals. - chain_
tangent - Unit tangent of a chain at arc length
s(unit when the start frame is orthonormal; a skewed frame maps it as it maps an intrinsic curve’s).