Documentation / @ripl/core / getPolygonPoints
Function: getPolygonPoints() ​
getPolygonPoints(
sides,cx,cy,radius,closePath?):Point[]
Defined in: packages/core/src/math/geometry.ts:65
Generates the vertex points of a regular polygon centred at (cx, cy) with the given radius and number of sides.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
sides | number | undefined |
cx | number | undefined |
cy | number | undefined |
radius | number | undefined |
closePath | boolean | true |
Returns ​
Point[]