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

Math.Spline.Class

Synopsis

# 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`.

Methods

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 `evalSpline . toBSpline` (not necessarily exactly, but up to reasonable expectations of numerical accuracy).

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

splineDegree :: s v -> IntSource

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

toBSpline :: s v -> BSpline Vector vSource

Instances

 (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 (VectorSpace a, Fractional (Scalar a), Ord (Scalar a)) => Spline CSpline a (VectorSpace a, Fractional (Scalar a), Ord (Scalar a), Vector v a, Vector v (Scalar a)) => Spline (BSpline v) a (VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline (BSpline Vector) v

class Spline s v => ControlPoints s v whereSource

Methods

controlPoints :: s v -> Vector vSource

Instances

 Spline BezierCurve v => ControlPoints BezierCurve v Spline MSpline v => ControlPoints MSpline v Spline ISpline v => ControlPoints ISpline v (Spline (BSpline v) a, Vector v a) => ControlPoints (BSpline v) a Spline (BSpline Vector) a => ControlPoints (BSpline Vector) a