diagrams-lib-0.5: Embedded domain-specific language for declarative graphics

Safe HaskellSafe-Infered




A cubic spline is a smooth, connected sequence of cubic curves passing through a given sequence of points. This module provides the cubicSpline method, which can be used to create closed or open cubic splines from a list of points. For access to the internals of the spline generation algorithm, see Diagrams.CubicSpline.Internal.


Constructing paths from cubic splines

cubicSpline :: (PathLike p, Fractional (V p)) => Bool -> [Point (V p)] -> pSource

Construct a spline path-like thing of cubic segments from a list of vertices, with the first vertex as the starting point. The first argument specifies whether the path should be closed. See: http://mathworld.wolfram.com/CubicSpline.html