Voronoi Diagram
A Voronoi diagram assigns every point to its nearest site. Move the sites and watch the cells reshape; the boundaries are perpendicular bisectors.
Every pixel takes the color of its nearest site. The dark boundaries are points equally close to two sites, so each edge is a perpendicular bisector. Add sites to create smaller cells; the diagram is the dual of the Delaunay triangulation.
What you are seeing
Each site owns the region closer to it than to any other site.
Cell boundaries are perpendicular bisectors of pairs of nearby sites.
Voronoi cells answer nearest-neighbor queries and appear in growth models, maps, and mesh generation.
Why it matters
Voronoi diagrams are used in wireless coverage, facility planning, ecology, computer graphics, and machine learning.
Complexity & details
Brute force assigns P pixels to S sites in O(PS). Optimal algorithms compute the diagram in O(S log S).
Frequently asked questions
What is a Voronoi cell?+
It is the set of all points closer to one particular site than to any other site.
How is it related to Delaunay triangulation?+
The Delaunay triangulation is the dual graph of the Voronoi diagram. Two sites share a Voronoi edge exactly when they are connected in Delaunay.