Wilang Documentation1.0.0+4

polygon#

Draw a polygon through the authored vertices.

Available in: math cells.

Syntax#

polygon([[x1, y1], [x2, y2], ...])

Arguments and behavior#

Each vertex is a two-element array. The closing edge is implicit, and a repeated final vertex is accepted. A polygon needs at least three vertices; self-intersecting polygons use the even-odd fill rule.

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
plot(polygon([[0, 0], [4, 0], [3, 2], [0, 3]]))

Expected result: plot.

See also#

plot

All functions · Math guides