Curve

A two-dimensional curve in 3D space.

Details

The data type has the following form:

 [
   {
     type: 'line_to' | 'line_dir' | 'arc_to' | 'arc' | 'bezier',
     startPt: [<number>,<number>,<number>],
     endPt: [<number>,<number>,<number>],
     arcCenter: [<number>,<number>,<number>],
     arcAxis: [<number>,<number>,<number>],
     bezierCtrlPt1: [<number>,<number>,<number>],
     bezierCtrlPt2: [<number>,<number>,<number>]
   },
   ...
 ]

It represents a curve that consists of various segments. These segments can be of various types like straight lines, circular arcs or cubic Bézier curves. The segments are generally expected to be connected at there start and end points within the order they appear in the array.

The curve exists generally within 3D space but it can used within a 2D environment by restricting it to the XY plane.