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

Geom2D.CubicBezier.Basic

Synopsis

# Documentation

Constructors

 CubicBezier FieldsbezierC0 :: Point bezierC1 :: Point bezierC2 :: Point bezierC3 :: Point

Instances

 Show CubicBezier AffineTransform CubicBezier

data PathJoin Source

Constructors

 JoinLine JoinCurve Point Point

Instances

 Show PathJoin

data Path Source

Constructors

 OpenPath [(Point, PathJoin)] Point ClosedPath [(Point, PathJoin)]

Instances

 Show Path

class AffineTransform a whereSource

Methods

transform :: Transform -> a -> aSource

Return True if the param lies on the curve, iff it's in the interval `[0, 1]`.

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 to the curve B(1-t).

Give the bernstein polynomial for each coordinate.

Calculate a value on the curve.

Calculate a value and the first derivative on the curve.

Calculate a value and all derivatives on the curve.

`findBezierTangent p b` finds the parameters where the tangent of the bezier curve `b` has the same direction as vector p.

Find the parameter where the bezier curve is horizontal.

Find the parameter where the bezier curve is vertical.

Find inflection points on the curve.

Find the cusps of a bezier.

arcLengthParam c len tol finds the parameter where the curve c has the arclength len, within tolerance tol.

Split a bezier curve into two curves.

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.

Return True if all the control points are colinear within tolerance.