cubicbezier-0.1.0: Efficient manipulating of 2D cubic bezier curves.

Safe HaskellSafe-Inferred

Math.BernsteinPoly

Synopsis

Documentation

bernsteinSubsegment :: BernsteinPoly -> Double -> Double -> BernsteinPolySource

Return the subsegment between the two parameters.

listToBernstein :: [Double] -> BernsteinPolySource

Create a bernstein polynomail from a list of coëfficients.

zeroPoly :: BernsteinPolySource

The constant zero.

(~*) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource

Multiply two bernstein polynomials. The final degree will be the sum of either degrees. This operation takes O((n+m)^2) with n and m the degree of the beziers.

(*~) :: Double -> BernsteinPoly -> BernsteinPolySource

Scale a bernstein polynomial by a constant.

(~+) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource

Sum two bernstein polynomials. The final degree will be the maximum of either degrees.

(~-) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource

Subtract two bernstein polynomials. The final degree will be the maximum of either degrees.

degreeElevate :: BernsteinPoly -> Int -> BernsteinPolySource

Degree elevate a bernstein polynomail.

bernsteinSplit :: BernsteinPoly -> Double -> (BernsteinPoly, BernsteinPoly)Source

Split a bernstein polynomial

bernsteinEval :: BernsteinPoly -> Double -> DoubleSource

Evaluate the bernstein polynomial.

bernsteinEvalDerivs :: BernsteinPoly -> Double -> [Double]Source

Evaluate the bernstein polynomial and its derivatives.

bernsteinDeriv :: BernsteinPoly -> BernsteinPolySource

Find the derivative of a bernstein polynomial.