> For the complete documentation index, see [llms.txt](https://codalin.gitbook.io/nodalin-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codalin.gitbook.io/nodalin-docs/nodes-reference/sources/polygon.md).

# Polygon

<table data-header-hidden><thead><tr><th width="141.6597900390625"></th><th></th></tr></thead><tbody><tr><td><div><figure><img src="https://937151318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F44MuVIHBk5o5yfcGn64w%2Fuploads%2FzeKMTjGJjeSlJUhxLL3e%2Fimage.png?alt=media&amp;token=c5e8b9c2-0173-41f9-b46b-8367b24651f4" alt="" width="76"><figcaption></figcaption></figure></div></td><td>Renders an regular polygon with customisable number of sides, position, rotation, fill color, and outline. Its vertices can be used to create <a href="/nodalin-docs/how-to.../instancing.md">instancing</a> groups of other shapes.</td></tr></tbody></table>

<table><thead><tr><th width="155.08984375">Property name</th><th width="404.59375">Description</th><th>Compatible datatype</th></tr></thead><tbody><tr><td>radius</td><td>Circumradius (distance from center to vertex, in pixels)</td><td>number</td></tr><tr><td>sides</td><td>Number of sides (e.g 6 = hexagon)</td><td>number</td></tr><tr><td>x</td><td>Horizontal position</td><td>number</td></tr><tr><td>y</td><td>Vertical position</td><td>number</td></tr><tr><td>rot</td><td>Rotation</td><td>number</td></tr><tr><td>color</td><td>Fill color</td><td>color</td></tr><tr><td>outline</td><td>Outline color</td><td>color</td></tr><tr><td>strokeWidth</td><td>Outline width</td><td>number</td></tr><tr><td>origin</td><td>Center point of the shape. Defaults to (0, 0). Changing it moves the shape’s pivot without affecting its x and y position.</td><td>point</td></tr><tr><td>instance</td><td>Instancing target</td><td>figure</td></tr><tr><td>instanceIndex</td><td>Displays the instance with the given index number</td><td>number</td></tr><tr><td>zindex</td><td>Controls which element appears on top when elements overlap; higher values sit above lower ones.</td><td>number</td></tr></tbody></table>

{% hint style="info" %}

* The `strokeWidth` property is available when a Color node is connected to the `outline`
* The `zindex` increases automatically, unless there's a connection to it.
* The `instanceIndex` property is available when a Source node is connected as an instancing target. Instancing index value cycles back when the provided value exceeds the available number of instances.&#x20;
  {% endhint %}
