Skip to content

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 ​

ParameterTypeDefault value
sidesnumberundefined
cxnumberundefined
cynumberundefined
radiusnumberundefined
closePathbooleantrue

Returns ​

Point[]