curve.divideAt(ratio [, opt])

Divide the curve into two curves at the point that lies ratio (normalized length) away from the beginning of the curve.

Returns an array with two new curves without modifying the original curve. The function expects ratio to lie between 0 and 1; values outside the range are constrained to 0 and 1, respectively.

This function mirrors the functionality of the line.divideAt() function. If it is necessary to divide the curve at a certain t value instead, use the curve.divideAtT() function.

The function uses the same algorithm as the curve.divideAtLength() function.

The default value for opt.precision is 3; this corresponds to maximum observed error of 0.1%.

The opt.subdivisions property may be specified, directly providing an array of pre-computed curve subdivisions from which to calculate curve length. Use the curve.getSubdivisions() function to obtain an array of curve subdivisions. The opt.precision property is still necessary, however; it determines the precision of the point search algorithm.