Repository navigation
Published on crates.io.
Added
- Added
kuva_basisand a second README figure comparing cubic Bernstein and clamped B-spline basis weights, with interior knot guides. - Added allocation-free Bernstein
basis_functions(t)andbasis_functions_with_derivatives::<R>(t)queries for generic, quadratic and cubic Béziers and line segments. Finite parameters may extrapolate; derivative orders above the degree return zero.BezierBasisErrorreports non-finite parameters or unrepresentable results. Existing curve evaluation and B-spline APIs are unchanged. - Added
bounding_box_oriented_approx()and_with_budget(n)to generic, quadratic and cubic Bézier curves and B-splines. Both returnOrientedBoundingBoxwith containment and coordinate methods, orOrientedBoundingBoxError. Specialized Béziers delegate to the generic implementation. The shared search uses subdivision and plane rotations without allocation or new dependencies. B-splines include every nonzero span and both limits at jumps. - Added
OrientedBoundingBoxDiagnosticsanddiagnostics()to report model work, error estimates and subdivision limits. Larger budgets retain the best earlier box. Documented the method, references and stack usage. The search has no global-optimality or approximation-ratio guarantee, and its floating-point bounds are not certified. - Added
oriented_box_studyfor Bézier and B-spline accuracy and timings in 2D, 3D and 4D. It writes CSV diagnostics and checks faces against polynomial extrema. Tests also cover known minimum boxes, jumps, extreme scales and higher dimensions. Reference orientations are numerical results, not certified optima.
Changed
- Excluded the generated
curves.svgandbasis.svgfrom the crates.io package; the README loads both images from GitHub. - Show tight curve boxes and dashed control boxes together in the plotting example and README figure.
- Rewrote the README, API comments and example explanations. Clarified parameter units, trait requirements and numerical limits.
The oriented-box fitter is a heuristic local search: it guarantees neither a local nor a global optimum. Nightly Rust remains required.
Full changelog: v0.4.0...v0.4.1