JitteredSquareGrid
Quick facts | |
---|---|
Grid | JitteredSquareGrid |
CellType | NGonCellType |
CellDir | CellDir |
CellRotation | CellRotation |
Bound | None |
Properties | 2d, Planar, Infinite |
An infinite version of the VoronoiGrid where the points are drawn from a known distribution.
To calculate the points, start with a unit square grid (i.e. new SquareGrid(1.0f)
) and then generate a point uniformly randomly inside each cell. A Voronoi diagram is then generated for the cells. In practise, this works by generating Voronoi diagrams for chunks of cells, then stitching them together.
Cell co-ordinates
Each cell in this grid has a point sampled from a particular cell of a new SquareGrid(1.0f)
, and shares the same co-ordinate values as that square cell.