Expand description
Certified derivative and chord bounds (#232), re-exported on the same
footing as curve and surface.
Certified derivative and chord bounds (#232).
A chord of a curve, or a triangle of a surface, is only as close to the exact geometry as the geometry’s second derivative allows, and a sample at the midpoint does not show that: a midpoint can sit on the chord while the curve bulges either side of it. This module bounds the derivatives from the data itself, so the numbers it returns are upper bounds, never estimates.
§The chord bound
For a curve c that is C^1 with a bounded second derivative on
[a, b], the linear interpolant l of its ends satisfies
|c(t) - l(t)| <= (b - a)^2 / 8 * sup |c''|: componentwise,
c - l = -int G(t, s) c''(s) ds with the non-negative Green’s function
of -d^2/dt^2 on [a, b], whose integral is (t - a)(b - t) / 2 <= (b - a)^2 / 8. l(t) lies on the chord, so every point of the arc is
within that of the chord. A circular arc of at most half a turn uses its
exact sagitta instead.
§Where the derivative bounds come from
- Conics:
c'' = -(r_x cos t X + r_y sin t Y), bounded in closed form over the interval (the frame is used as given, so a skewed frame is accounted for, not assumed away). - B-splines: the derivative of a B-spline is a B-spline on the derivative
control polygon, and a B-spline lies in the convex hull of the control
points that act on its span, so each derivative is bounded by the
largest of those control points. A rational spline
c = A / wis bounded through the quotient rule, withwbounded below by its smallest active weight (weights are positive) andcbounded by the control points’ spread about their centre; the centre is subtracted first, which leaves every derivative unchanged. - Elementary surfaces: closed forms over the parameter box. B-spline surfaces: the derivative control nets of the tensor product.
- Implicit curves (ADR 0077): cell by cell, the solved parameter’s
slope and bend through the implicit function theorem, with interval
bounds of the field’s partials over the stretch’s box; a bridge cell
by its cubic’s control points (
implicit, #249). - Quadratic and angle graphs (#414): a closed-form root
w(t)of an implicitF(t, w) = 0,w''through the implicit function theorem with interval enclosures ofF’s partials over the span by a certified height range (graph). - Lifted pcurves (#414): a space curve
cread in a surface’s parameters,S(p(t)) = c(t). The implicit function theorem over a box grown about the evaluated ends, with the surface’s certified parameter separation over it (SurfaceBoundOracle::separation, Weyl’s perturbation from the box’s centre), the space curve’s derivative bounds (section) and the outward-rounded residual of each end bound the pcurve’s speed and bend per piece (lifted,continuation); the section of two B-splines on the same terms in its four unknowns (pair). - Intrinsic curves (#317): at unit speed
|c''| = |k|, so the curvature law’s closed-form supremum, times the start frame’s stretch, bounds the chords (intrinsic_chord_bound2); their points are read with a certified error byIntrinsicPositions, andchord_bound2adds the distance of the evaluated ends from the exact points (#414). - Elevated and banked curves over an intrinsic plan (#393) or a chain plan
(#438): the plan’s and the profile’s exact-chord bounds in quadrature,
plus the distance of the evaluated ends from the points of an
ElevatedPositionTable(elevated_positions). - Arc-length chains (#438): the pieces’ exact-chord bounds, plus the
distance of the evaluated ends from the points of a
ChainPositionTable(chain_positions), which reads each piece’s exact point, tangent and curvature vector with a certified error carried through the placements. - Constant offsets
B + d u(#317):|P''|from the basis’s suprema through the unit-vector rule of the certified station lengths (offset_chord_bound2).
A B-spline is only as smooth as its knots allow. A knot of multiplicity
m leaves a degree d spline C^(d - m) there, so a bound that needs a
continuous k-th derivative refuses an interval with such a knot
strictly inside: the derivative bound would hold on each side but the
Taylor argument does not cross the jump. continuity_breaks2 and
continuity_breaks3 name those knots so a caller can split there.
Everything is computed in floating point from the data; the bounds are
inflated by ROUNDING relative so rounding in their own arithmetic
cannot make them undershoot.
Structs§
- Chain
Position Table - Certified positions, unit tangents and curvature vectors of an
arc-length chain over
[0, end], read in any order; see the module documentation. - Curve
Derivative Bounds - Suprema of the first three derivatives of a curve over an interval.
- Elevated
Position Table - Certified positions of an elevated or banked curve over an intrinsic or
a chain plan, in plan distance, read in any order: the plan from an
IntrinsicPositionTableor aChainPositionTable, the height and the pivot in closed form. - Intrinsic
Position Table - Certified positions of an intrinsic curve over
[0, end], read in any order: the unit tangent of its closed-form heading integrated by the composite two-point Gauss-Legendre rule, each point with a certified bound on its error (see the module documentation). - Intrinsic
Positions - Certified positions of an intrinsic curve: the unit tangent of its
closed-form heading integrated by the composite midpoint rule, each
point with a certified bound on its error (the remainder
w^3 / 24 (|k'| + k^2)per panel, panels split at seams, and the heading’s, the sums’ and the placement’s rounding). - Parameter
Separation - A certified lower bound of a surface’s Jacobian over a parameter box.
- Surface
Bound Oracle - Derivative bounds of one surface, prepared once for many boxes.
- Surface
Bounds - Suprema of a surface’s partial derivatives over a parameter box.
Enums§
- Seam
Side - Which piece a read at a join belongs to.
Constants§
- MAX_
POSITION_ PANELS - Most midpoint panels one curve’s positions may use.
- MAX_
TABLE_ PANELS - Most panels one table may use.
- ROUNDING
- Relative inflation applied to every returned bound, so the rounding of the bound’s own arithmetic cannot make it undershoot.
Functions§
- certifies_
flattening2 - Whether
crate::curve::flatten2certifies its chords for this family: every point of the curve then lies within the chord tolerance of the returned polyline (#232). Lines, polylines, circles, ellipses, sinusoids, B-splines with positive weights and arc-length chains whose pieces are all bounded (crate::chain::chain_certifies); other families are flattened on their midpoint sagitta alone, which is a measurement, not a bound. - certifies_
flattening3 certifies_flattening2forcrate::curve::flatten3.- chord_
bound2 - Certified chord bound of a 2D curve over
[a, b]. - chord_
bound3 - Certified chord bound of a 3D curve over
[a, b]; seechord_bound2. - continuity_
breaks2 - Parameters strictly inside the curve’s domain where a 2D curve may fail
to be
C^k(k >= 1): a polyline’s vertices, a B-spline’s knots of multiplicity abovedegree - k, an arc-length chain’s joins (where its curvature may jump; the chain isC^1there, but each piece is bounded on its own), an implicit curve’s cell joins and a lifted pcurve’s space curve’s breaks (#414). Empty for the smooth families. - continuity_
breaks3 continuity_breaks2for a 3D curve; an implicit section also breaks at its cell joins and a pair section at its interior nodes.- curve_
derivative_ bounds2 - Certified derivative suprema of a 2D curve over
[a, b]; seecurve_derivative_bounds3. Also covers sinusoids. - curve_
derivative_ bounds3 - Certified derivative suprema of a 3D curve over
[a, b], orNonefor a family this module cannot bound. - frame_
stretch2 - The largest factor by which a 2D frame stretches a local vector.
- frame_
stretch3 - The largest factor by which a 3D frame stretches a local vector.
- intrinsic_
chord_ bound2 - Certified chord bound of a 2D intrinsic curve over
[a, b]:h^2 / 8 sigma sup |k|, across seams of its law too.Noneoutside[0, length]or for a law with no closed-form bound. - intrinsic_
chord_ bound3 - Certified chord bound of a 3D intrinsic curve over
[a, b]:h^2 / 8 sigma sup |k|, whatever its torsion (|c''| = |k|).Noneoutside[0, length]or for a curvature law with no closed-form bound. - intrinsic_
derivative_ bounds2 - Certified derivative suprema of a 2D intrinsic curve over
[a, b]of its arc length;Noneoutside[0, length]or for a law with no closed-form bound.thirdis infinite over a span with a seam of the law strictly inside. - offset_
chord_ bound2 - Certified chord bound of the offset of a 2D curve by
distance(seeoffset_point2) over[a, b]of the basis’s parameter.Nonefor a basis with no derivative bound, a span with a break of the basis’sC^2continuity strictly inside, or one whose tangent may vanish. - offset_
chord_ bound3 - Certified chord bound of the offset of a 3D curve by
distancealongV x B'(seeoffset_point3) over[a, b]of the basis’s parameter;Noneas foroffset_chord_bound2, or where the tangent may lie alongV. - offset_
point2 - The point of the offset by
distanceto the left of a 2D curve at its parametert:B(t) + d normalise(Z x B'(t)). - offset_
point3 - The point of the offset by
distancealongnormalise(V x B'(t))of a 3D curve at its parametert,Vthe reference direction.