Function: voronoiCells()
ts
function voronoiCells(sites, box): Polygon[];Voronoi cells of sites within box: each cell is the box clipped by the perpendicular bisectors towards nearby sites. Neighbors are visited ring by ring through a bucket grid, stopping once no further site can cut the cell.
Parameters
| Parameter | Type |
|---|---|
sites | Vec[] |
box | Rect |
Returns
Polygon[]