Shapes and placement · 3 of 6
Polygons
A polygon takes a list of points, its vertices in order around the outline:
shape polygon with [(0, 0), (4um, 0), (0, 3um)] as triangle
place triangle at (10um, 0)A list is written in square brackets and a point as (x, y). The vertices are given in the polygon's own coordinates, and its origin is the point (0, 0) of those coordinates — not necessarily the center. So place triangle at (10um, 0) moves the vertex at (0, 0) to (10um, 0). The bounding-box anchors work as for every other shape.
The outline closes by itself: do not repeat the first vertex at the end.
Exercise
Replace the triangle with a right-pointing arrow, its tail on the y axis: a shaft 6 µm long and 2 µm thick, centered on the x axis, and a head 4 µm long and 6 µm tall with its tip at (10 µm, 0).