Skip to main content

Module curves

Module curves 

Source
Expand description

Parametric curves — Bezier, B-Spline, Catmull-Rom, and Hermite splines.

All curves implement the Curve trait: sample(t) returns a point on the curve for t ∈ [0, 1]. Arc-length reparametrization is provided for uniform speed traversal.

Structs§

ArcTable
Precomputed arc-length lookup table for uniform speed traversal.
BSpline
Cubic uniform B-Spline (C2 continuity). Does NOT pass through control points.
BezierN
Arbitrary-degree Bezier via De Casteljau’s algorithm.
CatmullRom
Catmull-Rom spline through a sequence of waypoints.
CompositeCurve
Multiple curve segments joined end-to-end.
CubicBezier
Cubic Bezier curve (4 control points).
CubicBezier2D
2D cubic Bezier for UI/path use.
CurveWalker
Iterator that walks a curve at fixed arc-length steps.
FrenetFrame
Frenet-Serret frame at a point on a curve.
HermiteSpline
Cubic Hermite spline: interpolates positions and velocities at each knot.
LineSegment
Simple line segment from A to B.
QuadraticBezier
Quadratic Bezier curve through 3 control points.

Traits§

Curve
Common interface for parametric curves.