Polygon
Polygon is a fixed number of vertices on a layer. Create one with polygon.
Fields
| Field | Type | Description |
|---|---|---|
layer | String | Layer name. |
points | [Point] | Vertices, in order. |
xN | Float | x coordinate of vertex N, such as x0 or x2. |
yN | Float | y coordinate of vertex N. |
shape.x2 and shape.points[2].x refer to the same coordinate.
let triangle = polygon(
"met1", 3,
x0=0., y0=0.,
x1=100., y1=0.,
x2=50., y2=80.,
);
The constructor's xNi and yNi arguments set initial coordinates.