Skip to main content

n-star

n-star() 

Draws a n-pointed star.

n-star((0,0), 5)

// An 8-pointed star, rotated
n-star((2,0), 8, angle: 11.25deg)

// A 6-pointed star showing its inner hexagon
n-star((4,0), 6, show-inner: true, style: red)

Coordinate to draw the star's center at.

sides:

Number of points of the star (>= 3).

angle:

Default: 0deg

Angle to rotate the star around its origin.

name:

none or str
Default: none

An optional name to identify the shape.

Styling

Root: nstar

radius:

The radius of the star's outer points.

inner-radius:

The radius (if of type ratio, relative to the outer radius) of the star's inner points of the star's inner points.

show-inner:

Default: false

If true, also draws the inner polygon connecting the star's inner points.

The fill color for the star.

stroke:

The stroke for the star and the inner polygon.