Safe Haskell | None |
---|
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.
- bezierIntersection :: CubicBezier -> CubicBezier -> Double -> [(Double, Double)]
- bezierLineIntersections :: CubicBezier -> Line -> Double -> [Double]
- bezierFindRoot :: BernsteinPoly -> Double -> Double -> Double -> [Double]
- closest :: CubicBezier -> Point -> Double -> [Double]
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.
:: 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.