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

Safe HaskellNone




data ISpline v Source

The I-Spline basis functions are the integrals of the M-splines, or alternatively the integrals of the B-splines normalized to the range [0,1]. Every I-spline basis function increases monotonically from 0 to 1, thus it is useful as a basis for monotone functions. An I-Spline curve is monotone if and only if every non-zero control point has the same sign.


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

iSpline :: Knots (Scalar a) -> Vector a -> ISpline aSource

iSpline kts cps creates an I-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).

toISpline :: (Spline s v, Eq v) => s v -> ISpline vSource

evalSpline :: Spline s v => s v -> Scalar v -> vSource