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

Math.Spline.BezierCurve

Synopsis

Documentation

data BezierCurve v Source

A BezierCurve curve on 0 <= x <= 1.

bezierCurve :: [v] -> BezierCurve vSource

Construct a Bezier curve from a list of control points. The degree of the curve is one less than the number of control points.

splitBezierCurve :: VectorSpace v => BezierCurve v -> Scalar v -> (BezierCurve v, BezierCurve v)Source

Split and rescale a Bezier curve. Given a BezierCurve b and a point t, splitBezierCurve b t creates 2 curves (b1, b2) such that (up to reasonable numerical accuracy expectations):

 evalSpline b1  x    == evalSpline b (x * t)
 evalSpline b2 (x-t) == evalSpline b (x * (1-t))

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