Create a Bezier curve. In a cubic bezier curve, the first and 4th anchors are end-points, and 2nd and 3rd anchors are control-points.
a group of anchor Pt
the number of line segments per curve. Defaults to 10 steps.
a curve as a group of interpolated Pt
Create a B-spline curve
a group of anchor Pt
the number of line segments per curve. Defaults to 10 steps.
optional value between 0 to n to specify a "tension". Default is 1 which is the usual tension.
a curve as a group of interpolated Pt
Interpolate to get a point on a B-spline curve
the coefficients [ttt, t*t, t, 1]
a group of anchor Pts
optional value between 0 to n to specify a "tension". Default to 1 which is the usual tension.
an interpolated Pt on the curve
Create a Cardinal spline curve
a group of anchor Pt
the number of line segments per curve. Defaults to 10 steps.
optional value between 0 to 1 to specify a "tension". Default to 0.5 which is the tension for Catmull-Rom curve.
a curve as a group of interpolated Pt
Interpolate to get a point on Catmull-Rom curve
the coefficients [ttt, t*t, t, 1]
a group of anchor Pts
optional value between 0 to 1 to specify a "tension". Default to 0.5 which is the tension for Catmull-Rom curve
an interpolated Pt on the curve
Given an index for the starting position in a Pt group, get the control and/or end points of a curve segment
a group of Pt
start index in pts
array. Default is 0.
an optional boolean value to indicate if the start index should be used twice. Default is false.
a group of 4 Pts
Get a precalculated coefficients per step
number of steps
Generated using TypeDoc
Curve class provides static functions to interpolate curves. A curve is usually represented as a Group of 3 control points. You can use the static function as-is, or apply the
op
method in Group or Pt to many of these functions. See Op guide for details.