- class (VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline s v where
- splineDomain :: s v -> Maybe (Scalar v, Scalar v)
- evalSpline :: s v -> Scalar v -> v
- splineDegree :: s v -> Int
- knotVector :: s v -> Knots (Scalar v)
- toBSpline :: s v -> BSpline v

- class Spline s v => ControlPoints s v where
- controlPoints :: s v -> [v]

# Documentation

class (VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline s v whereSource

A spline is a piecewise polynomial vector-valued function. The necessary
and sufficient instance definition is `toBSpline`

.

splineDomain :: s v -> Maybe (Scalar v, Scalar v)Source

Returns the domain of a spline. In the case of B-splines, this is
the domain on which a spline with this degree and knot vector has a
full basis set. In other cases, it should be no larger than
`splineDomain . toBSpline`

, but may be smaller. Within this domain,
`evalSpline`

should agree with

(not
necessarily exactly, but up to reasonable expectations of numerical
accuracy).
`evalSpline`

. `toBSpline`

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

splineDegree :: s v -> IntSource

knotVector :: s v -> Knots (Scalar v)Source

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline BSpline v | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline BezierCurve v | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline MSpline v | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline ISpline v |

class Spline s v => ControlPoints s v whereSource

controlPoints :: s v -> [v]Source

Spline BSpline v => ControlPoints BSpline v | |

Spline BezierCurve v => ControlPoints BezierCurve v | |

Spline MSpline v => ControlPoints MSpline v | |

Spline ISpline v => ControlPoints ISpline v |