rotationnumber — polygon rotation (first vertex will be along
the positive x axis) (0)
numnumber — number of shapes to generate (10)
sizenumber — size of each shape (0.01)
shapenumber | (center: Point, size: number) => number[] — By default a square of two triangles is created (six vertices). Use a
number to create a regular polygon with number sides. Use a custom
function to make a custom shape. The function takes as input the [x, y]
position of the point to build the shape around, and size. It outputs an
array of interlaced x and y coordinates of triangle vertices - i.e.:
[x1, y1, x2, y2, x3, y3, ....]
Options object to generate shapes at random positions within a polygon.
radiusnumber— radius of polygon (1)sidesnumber— number of polygon sides (4)positionTypeParsablePoint — center position of polygon ([0, 0])rotationnumber— polygon rotation (first vertex will be along the positive x axis) (0)numnumber— number of shapes to generate (10)sizenumber— size of each shape (0.01)shapenumber|(center: Point, size: number) => number[]— By default a square of two triangles is created (six vertices). Use anumberto create a regular polygon withnumbersides. Use a custom function to make a custom shape. The function takes as input the [x, y] position of the point to build the shape around, andsize. It outputs an array of interlaced x and y coordinates of triangle vertices - i.e.: [x1, y1, x2, y2, x3, y3, ....]