PLAYGROUND (experimental)

randpolygon

Returns the random coordinates of a point (or several points) inside a polygon, or on its perimeter.
randpolygon(
    points, 
    [outline=true], 
    [count=1]
) -> LIST [x,y]

Returns the random coordinates of a point (or several points) inside a polygon, or on its perimeter.

Syntaxe

var pt = randpolygon(points=[x0,y0, x1,y1, x2,y2...], outline=true);

Arguments

NameTypeRequiredDefaultDescription
pointsyes-List for polygon'coords [x0,y0, x1,y1, x2,y2...] 3 points minimum
outline-truetrue=perimeter, false=inside
count-1number of points to return