Skip to content

Polygon

Generates a regular polygon with a configurable number of sides and optional rounded corners.

Category: Shapes Menu path: Shapes > Polygon

Ports

PortTypeDirectionDescription
outshapeoutputPolygon shape data

Parameters

ParamTypeDefaultDescription
radiusscalar100Circumscribed radius in pixels (center to vertex)
sidesscalar6Number of sides (3 = triangle, 4 = diamond, 5 = pentagon, 6 = hexagon, etc.)
cornerRadiusscalar0Corner rounding radius in pixels (0 = sharp vertices)

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
radius_inscalarradius
sides_inscalarsides
cornerRadius_inscalarcornerRadius

How It Works

Generates a closed regular polygon centered at the origin in local space. Vertices are evenly distributed around a circle of the given radius. When cornerRadius is greater than zero, each vertex is replaced with a circular arc, softening the corners. The shape is pure geometry data (no GPU allocation) and must be rasterized via DrawShape to produce a visible image.

Usage Examples

Basic: Draw a hexagon

Polygon -> Transform2D -> DrawShape -> Output. Default settings produce a hexagon with radius 100.

Triangle

Set sides to 3 for an equilateral triangle. Increase cornerRadius for a rounded triangle.

Animated morphing

Keyframe sides from 3 to 12 (or connect a Time-driven expression to sides_in) for a shape that smoothly gains vertices over time.

Star base

Use a low side count (5-6) with high cornerRadius as a starting point, then feed into ShapeDeform for star-like variations.

Tips

  • Press P to activate the Polygon shelf tool for click-drag creation in the viewport.
  • sides is treated as a float internally -- fractional values blend between whole-number shapes.
  • Shapes are centered at the origin. Use Transform2D for all positioning and rotation.
  • A polygon with 4 sides is oriented as a diamond. For a square, use Rectangle instead.
  • Rectangle -- axis-aligned rectangle (better for squares and cards)
  • Circle -- perfect circle
  • ShapeDeform -- per-vertex deformation for more complex shapes
  • Transform2D -- positions and scales the shape in the composition
  • DrawShape -- rasterizes shapes to pixels with fill/stroke

Caddis — professional motion design.