Wilang Documentation1.0.0+4

regularPolygon#

Draw a regular polygon on a circumcircle.

Available in: math cells.

Syntax#

regularPolygon(center, sides, radius)

Arguments and behavior#

The side count is an integer literal between 3 and 4096, and the radius is the circumradius — the distance from the center to a vertex, not the side length. The first vertex sits at center + [radius, 0] and the vertices run counter-clockwise.

Example#

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

Example
plot(regularPolygon([0, 0], 5, 2))

Expected result: plot.

See also#

plot

All functions · Math guides