utils.splitCurve()

The utils.splitCurve() function splits a curve defined by 4 points start, cp1, cp2, and end on the point split and returns an array holding both halves.

Signature

Javascript
array utils.splitCurve(
  Point start, 
  Point cp1, 
  Point cp2, 
  Point end, 
  Point check, 
)

Example

Notes

The returned object has this signature:

Javascript
[
  { 
    start: Point,
    cp1: Point,
    cp2: Point,
    end: Point,
  },
  { 
    start: Point,
    cp1: Point,
    cp2: Point,
    end: Point,
  },
]