# GeoVoronoi

Voronoi Diagram is partitioning of a plane with n points into convex polygons such that each polygon contains exactly one generating point and every point in a given polygon is closer to its generating point than to any other. A Voronoi diagram is sometimes also known as a Dirichlet tessellation. GeoVoronoi is an extension of Voronoi optimized for geo locations.

## Example usage

`var sites = ;sites;sites;sites;sites;sites;sites; var geoVoronoi = ;var voronoiGraph = geoVoronoi;`

Above code will generate generate this data

This Voronoi graph will contain following main components

**cells:**This contains information for all the polygons(zone) along with their owner sites. A polygon is represented by halfedges (called so as most of them are shared among two adjacent polygons). Each half edge has start and end vertices called va and vb respectively. Set of start vertices of all**half-edges**will be all the vertices of the polygon. Information of cells is enough for basic calculations.**edges:**This contains information about start and end points of all the edges in the resulting Voronoi diagram.**vertices:**This contains information about all the vertices in the resulting Voronoi diagram.

See this blogpost for further explanation

Also check out Raycast as it goes very well with Voronoi.