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

Safe HaskellNone

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 -> CubicBezier -> Double -> [(Double, Double)]Source

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

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

Find the intersections of the curve with a line.

bezierFindRootSource

Arguments

:: BernsteinPoly

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.

closest :: CubicBezier -> Point -> Double -> [Double]Source

Find the closest value(s) on the bezier to the given point, within tolerance.