Expand description
prime-splines — Curve interpolation: Bezier, Hermite, Catmull-Rom, B-spline, slerp.
All public functions are pure (LOAD + COMPUTE only). No &mut, no side effects,
no hidden state. Same inputs always produce the same output.
§Temporal Assembly Model
- LOAD — read function parameters
- COMPUTE — pure math
STORE and JUMP do not exist here.
§Included
bezier_quadratic/bezier_quadratic_3d— quadratic Bezier (3 control points)bezier_cubic/bezier_cubic_3d— cubic Bezier (4 control points)hermite/hermite_3d— cubic Hermite (position + tangent at endpoints)catmull_rom/catmull_rom_3d— Catmull-Rom (smooth through control points)b_spline_cubic/b_spline_cubic_3d— uniform cubic B-spline segmentslerp— spherical linear interpolation for unit quaternionsbezier_cubic_arc_length/bezier_cubic_arc_length_3d— approximate arc lengthbezier_cubic_t_at_length/bezier_cubic_t_at_length_3d— inverse arc-length parameterisation
Functions§
- b_
spline_ cubic - Uniform cubic B-spline segment.
- b_
spline_ cubic_ 3d - Uniform cubic B-spline segment on
(x, y, z)tuples. - bezier_
cubic - Cubic Bezier interpolation (4 control points).
- bezier_
cubic_ 3d - Cubic Bezier interpolation on
(x, y, z)tuples. - bezier_
cubic_ arc_ length - Approximate arc length of a 1-D cubic Bezier by subdividing into
stepslinear segments. - bezier_
cubic_ arc_ length_ 3d - Approximate arc length of a 3-D cubic Bezier by subdividing into
stepslinear segments. - bezier_
cubic_ t_ at_ length - Find the parameter
tcorresponding to a target arc length along a 1-D cubic Bezier. - bezier_
cubic_ t_ at_ length_ 3d - Find the parameter
tcorresponding to a target arc length along a 3-D cubic Bezier. - bezier_
quadratic - Quadratic Bezier interpolation (3 control points).
- bezier_
quadratic_ 3d - Quadratic Bezier interpolation on
(x, y, z)tuples. - catmull_
rom - Uniform Catmull-Rom spline segment.
- catmull_
rom_ 3d - Catmull-Rom spline segment on
(x, y, z)tuples. - hermite
- Cubic Hermite interpolation: endpoints and tangents.
- hermite_
3d - Cubic Hermite interpolation on
(x, y, z)tuples. - slerp
- Spherical linear interpolation between two unit quaternions.