Curve:slice

Returns a new Curve created by slicing the Curve at the specified start and end points.

curve = Curve:slice(t1, t2)

Arguments

NameTypeDescription
t1number The starting point to slice at.
t2number The ending point to slice at.

Returns

NameTypeDescription
curveCurve A new Curve.

Notes

The new Curve will have the same number of control points as the existing curve.

An error will be thrown if t1 or t2 are not between 0 and 1, or if the Curve has less than two points.

See also