Expand description
A const-generic, no-std spline library for Bezier and B-spline curves.
The core abstraction is the Point trait, which models
a fixed-dimension vector space element. Optional capability traits such as
PointIndex, PointDot, and PointNorm enable component access and
geometric helpers when required.
§Examples
use stroke::{Bezier, PointN};
let curve = Bezier::<PointN<f32, 2>, 3>::new([
PointN::new([0.0, 0.0]),
PointN::new([1.0, 0.0]),
PointN::new([1.0, 1.0]),
]);
let mid = curve.eval(0.5);§Feature flags
nalgebra: implementsPointfornalgebra::SVector<T, D>(addnalgebraas a dependency).
Re-exports§
pub use bezier::Bezier;pub use bspline::BSpline;pub use bspline_path::BSplinePath;pub use cubic_bezier::CubicBezier;pub use find_root::FindRoot;pub use line::LineSegment;pub use path::BezierPath;pub use point::Point;pub use point::PointDot;pub use point::PointIndex;pub use point::PointNorm;pub use point_generic::PointN;pub use quadratic_bezier::QuadraticBezier;
Modules§
- bezier
- Const-generic Bezier curves of arbitrary degree.
- bezier_
segment - Sum type for specialized Bezier segments.
- bspline
- Const-generic B-spline curves.
- bspline_
path - B-spline path utilities.
- cubic_
bezier - Cubic Bezier curve specialization.
- find_
root - Root-finding helpers for curve types that support per-axis evaluation.
- line
- Line segment curve type.
- path
- Mixed Bezier path utilities.
- point
- Point traits and capability helpers.
- point_
generic - Const-generic point type for users who do not want external math dependencies.
- quadratic_
bezier - Quadratic Bezier curve specialization.