User Tools


Polygon

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

PolygonsPolygons

Learn about polygons at MathIsFun.com

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

Defaults:

  • 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] ])