Curve class provides static functions to interpolate curves. A curve is usually represented as a Group of 3 or more control points.
You can use the static functions as-is, or apply the Group.op
or Pt.op
to enable functional programming.
See Op guide for details.
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
Interpolate to get a point on a cubic Bezier curve.
the coefficients [tt*t, tt, t, 1]
a group of anchor Pts
an interpolated Pt on the curve
Create a basis spline (NURBS) 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 basis spline curve.
the coefficients [tt*t, tt, t, 1]
a group of anchor Pts
an interpolated Pt on the curve
Interpolate to get a point on a basis spline curve with tension.
the coefficients [tt*t, tt, 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 curve.
a Group or an Iterable
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 Cardinal curve.
the coefficients [tt*t, tt, 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
Create a Catmull-Rom curve. Catmull-Rom is a kind of smooth-looking Cardinal curve.
a Group or an Iterable
the number of line segments per curve. Defaults to 10 steps
a curve as a group of interpolated Pt
Interpolate to get a point on Catmull-Rom curve.
the coefficients [tt*t, tt, t, 1]
a group of anchor Pts
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 or an Iterable
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