Generate random Voronoi fracture sites within a polygon.
Places count random points inside the given polygon using rejection sampling. Useful for generating fracture patterns.
count
Polygon vertices (as VoronoiPoint[]).
Number of sites to generate.
Optional RNG function (default Math.random).
Math.random
Array of points guaranteed to be inside the polygon.
Generate random Voronoi fracture sites within a polygon.
Places
countrandom points inside the given polygon using rejection sampling. Useful for generating fracture patterns.