==== Polygon ==== A two dimensional shape with straight sides, and the shape is "closed" (all the sides connect up). {{:wiki:mathisfun-polygon-1.png?nolink|Polygons}}{{:wiki:mathisfun-polygon-2.png?nolink|Polygons}} //[[http://www.mathsisfun.com/geometry/polygons.html|Learn about polygons at MathIsFun.com]]// //NOTE: The ordering of points is VERY IMPORTANT. If the polygon is going to be extruded then the points must be in counter-clockwise order, otherwise the faces of the object will be facing inwards. See [[en:math_guide_orientation|Orientation]].// //HINT: Polygons should have a positive area.// The following show examples of creating polygons from a list of points. Defaults: * empty const { polygon } = require('@jscad/modeling').primitives const myshape = polygon({ points: [ [0,0],[3,0],[3,3] ] })