Skip to main content

polygon

polygon() 

Draws a regular polygon.

Styling

Root: polygon

set-style(polygon: (radius: 0.65))

polygon((0, 0), 3, angle: 90deg)
polygon((1.5,0), 5)
polygon((3, 0), 7)

Coordinate to draw the polygon at

sides:

​

Number of sides of the polygon (>= 3)

angle:

Default: 0deg​

Angle angle to rotate the polygon arround its origin

name:

none or str
​

radius:

Default: 1​

Radius of the polygon