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

Safe HaskellNone
LanguageHaskell98

Geom2D.CubicBezier.Intersection

Description

Intersection routines using Bezier Clipping. Provides also functions for finding the roots of onedimensional bezier curves. This can be used as a general polynomial root solver by converting from the power basis to the bernstein basis.

Synopsis

Documentation

bezierIntersection :: CubicBezier Double -> CubicBezier Double -> Double -> [(Double, Double)] Source #

Find the intersections between two Bezier curves, using the Bezier Clip algorithm. Returns the parameters for both curves.

bezierLineIntersections :: CubicBezier Double -> Line Double -> Double -> [Double] Source #

Find the intersections of the curve with a line.

bezierFindRoot Source #

Arguments

:: BernsteinPoly Double

the bernstein coefficients of the polynomial

-> Double

The lower bound of the interval

-> Double

The upper bound of the interval

-> Double

The accuracy

-> [Double]

The roots found

Find the zero of a 1D bezier curve of any degree. Note that this can be used as a bernstein polynomial root solver by converting from the power basis to the bernstein basis.