splines-0.1: B-Splines, other splines, and NURBS.




data BSpline v Source


Spline BSpline v => ControlPoints BSpline v 
(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline BSpline v 
(Eq (Scalar v), Eq v) => Eq (BSpline v) 
(Ord (Scalar v), Ord v) => Ord (BSpline v) 
(Show (Scalar v), Show v) => Show (BSpline v) 

bSpline :: Knots (Scalar a) -> [a] -> BSpline aSource

bSpline kts cps creates a B-spline with the given knot vector and control points. The degree is automatically inferred as the difference between the number of spans in the knot vector (numKnots kts - 1) and the number of control points (length cps).

insertKnot :: (VectorSpace a, Ord (Scalar a), Fractional (Scalar a)) => BSpline a -> Scalar a -> BSpline aSource

Insert one knot into a BSpline