Module flo_curves::bezier [] [src]

Structs

Curve

Represents a Bezier curve

Tangent

A structure that can be used to compute the tangent of a bezier curve

Traits

BezierCurve

Trait implemented by things representing a cubic bezier curve

NormalCurve

Trait implemented by bezier curves where we can compute the normal

Normalize

Changes a point and its tangent into a normal

Functions

basis

The cubic bezier weighted basis function

bounding_box4

Finds the upper and lower points in a cubic curve's bounding box

de_casteljau2

de Casteljau's algorithm for lines

de_casteljau3

de Casteljau's algorithm for quadratic bezier curves

de_casteljau4

de Casteljau's algorithm for cubic bezier curves

derivative2

Returns the 3rd derivative of a cubic bezier curve (2nd of a quadratic)

derivative3

Returns the 1st derivative of a quadratic bezier curve (or the 2nd derivative of a cubic curve)

derivative4

Returns the 1st derivative of a cubic bezier curve

find_extremities

Finds the t values of the extremities of a curve (these are the points at which the x or y value is at a minimum or maximum)

fit_curve

Creates a bezier curve that fits a set of points with a particular error

fit_curve_cubic

Fits a bezier curve to a subset of points

move_point

Moves the point at 't' on the curve by the offset vector

offset

Computes a series of curves that approximate an offset curve from the specified origin curve

subdivide4

Subdivides a cubic bezier curve at a particular point, returning the weights of the two component curves