shape(position: [number, number], 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 circle.
radiusnumber— radius of circle (1)positionTypeParsablePoint — center position of circle ([0, 0])numnumber— number of shapes to generate (10)shape(position: [number, number], 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, ....]