Skip to main content

n-star

n-star() 

Draws a n-pointed star.

Styling

Root: nstar

set-style(n-star: (radius: 0.65))

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

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

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

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

An optional name to identify the shape.

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.