Safe Haskell | None |
---|
- data CubicBezier = CubicBezier {}
- data PathJoin
- data Path
- class AffineTransform a where
- bezierParam :: Double -> Bool
- bezierParamTolerance :: CubicBezier -> Double -> Double
- reorient :: CubicBezier -> CubicBezier
- bezierToBernstein :: CubicBezier -> (BernsteinPoly, BernsteinPoly)
- evalBezier :: CubicBezier -> Double -> Point
- evalBezierDeriv :: CubicBezier -> Double -> (Point, Point)
- evalBezierDerivs :: CubicBezier -> Double -> [Point]
- findBezierTangent :: Point -> CubicBezier -> [Double]
- bezierHoriz :: CubicBezier -> [Double]
- bezierVert :: CubicBezier -> [Double]
- findBezierInflection :: CubicBezier -> [Double]
- findBezierCusp :: CubicBezier -> [Double]
- arcLength :: CubicBezier -> Double -> Double -> Double
- arcLengthParam :: CubicBezier -> Double -> Double -> Double
- splitBezier :: CubicBezier -> Double -> (CubicBezier, CubicBezier)
- bezierSubsegment :: CubicBezier -> Double -> Double -> CubicBezier
- splitBezierN :: CubicBezier -> [Double] -> [CubicBezier]
- colinear :: CubicBezier -> Double -> Bool
Documentation
data CubicBezier Source
class AffineTransform a whereSource
bezierParam :: Double -> BoolSource
Return True if the param lies on the curve, iff it's in the interval [0, 1]
.
bezierParamTolerance :: CubicBezier -> Double -> DoubleSource
Convert a tolerance from the codomain to the domain of the bezier curve. Should be good enough, but may not hold for high very tolerance values.
reorient :: CubicBezier -> CubicBezierSource
Reorient to the curve B(1-t).
bezierToBernstein :: CubicBezier -> (BernsteinPoly, BernsteinPoly)Source
Give the bernstein polynomial for each coordinate.
evalBezier :: CubicBezier -> Double -> PointSource
Calculate a value on the curve.
evalBezierDeriv :: CubicBezier -> Double -> (Point, Point)Source
Calculate a value and the first derivative on the curve.
evalBezierDerivs :: CubicBezier -> Double -> [Point]Source
Calculate a value and all derivatives on the curve.
findBezierTangent :: Point -> CubicBezier -> [Double]Source
findBezierTangent p b
finds the parameters where
the tangent of the bezier curve b
has the same direction as vector p.
bezierHoriz :: CubicBezier -> [Double]Source
Find the parameter where the bezier curve is horizontal.
bezierVert :: CubicBezier -> [Double]Source
Find the parameter where the bezier curve is vertical.
findBezierInflection :: CubicBezier -> [Double]Source
Find inflection points on the curve.
findBezierCusp :: CubicBezier -> [Double]Source
Find the cusps of a bezier.
arcLengthParam :: CubicBezier -> Double -> Double -> DoubleSource
arcLengthParam c len tol finds the parameter where the curve c has the arclength len, within tolerance tol.
splitBezier :: CubicBezier -> Double -> (CubicBezier, CubicBezier)Source
Split a bezier curve into two curves.
bezierSubsegment :: CubicBezier -> Double -> Double -> CubicBezierSource
Return the subsegment between the two parameters.
splitBezierN :: CubicBezier -> [Double] -> [CubicBezier]Source
Split a bezier curve into a list of beziers The parameters should be in ascending order or the result is unpredictable.
colinear :: CubicBezier -> Double -> BoolSource
Return True if all the control points are colinear within tolerance.