User Tools


This is an old revision of the document!


Path

A path is a series of points, connected by very thin (invisible) lines. In addition, a path can be open or closed. A closed path has a line between first and last points.

Paths can be created by giving an array of points, or by calling various functions to create or extend a path.

Note: The difference between Paths and 2D shapes are that Paths are composed of very thin lines, whereas a two dimensional shapes always enclose an area.

Which include:

of course we could simply have done: var path = new CSG.Path2D([ [10,10], [-10,10], [-10,-10], [10,-10] ], /* closed = */ true);

We can make arcs and circles: var curvedpath = CSG.Path2D.arc({ center: [0,0,0], radius: 10, startangle: 0, endangle: 180, resolution: 16, }); </code>