Copyright | (C) 2015 Dimitri Sabadie |
---|---|
License | BSD3 |
Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
A Spline s a
represents a curve in which a
is very likely to be
Additive
(see "linear") and s
is the sampling type.
The library exports two useful functions: spline
and smooth
. The former
enables you to create splines while the latter enables you to sample from
them using their control points.
Spline
A Spline
is a collection of control points with associated polynomials.
Given two control points which indices are i and i+1, interpolation on
the resulting curve is performed using the polynomial of indice i. Thus,
the latest control point is ignored and can be set to whatever the user wants
to, even undefined
– you should use hold, though. Yeah, don’t go filthy.
unspline :: Spline s a -> [(CP s a, Polynomial s a)] Source
Deconstruct a 'Spline s a' to yield '[(CP s a,Polynomial s a)]'.