User Tools


A two dimensional shape with straight sides, and the shape is “closed” (all the sides connect up).


Learn about polygons at

The following show examples of creating polygons from a list of points.


  • empty
let p1 = polygon([ [0,0],[3,0],[3,3] ])
let p2 = polygon({ points: [ [0,0],[3,0],[3,3] ] })

The CSG library functions can also be used. NOTE: Deprecated in the V2 API

let p3 = CAG.fromPoints([ [0,0],[5,0],[3,5],[0,5] ])