← back to geometry

Voronoi Diagrams

Wikipedia (wpVoronoi diagram) · CC BY-SA 4.0

Given a set of points (sites), the Voronoi diagram partitions the plane into cells. Each cell contains all points closer to its site than to any other. The boundaries are perpendicular bisectors. Every point in the plane belongs to exactly one cell. Nature uses Voronoi diagrams everywhere: giraffe spots, mud cracks, cell territories.

Nearest-neighbor partition

The Voronoi cell of site p is the set of all points x where d(x, p) ≤ d(x, q) for every other site q. The boundary between two cells is the perpendicular bisector of the segment joining their sites. In 2D, each cell is a convex polygon (possibly unbounded).

Scheme

Voronoi cells

Each cell is convex. In the Euclidean case, the number of edges per cell is at most 6 on average (by Euler's formula for planar graphs). Cells near the boundary of the point set are unbounded, extending to infinity.

A B C D Voronoi diagram of four sites

Fortune's algorithm

Computing a Voronoi diagram naively (check every point against every site) is O(n) per query. Fortune's algorithm builds the entire diagram in O(n log n) by sweeping a line across the plane. It maintains a "beach line" of parabolic arcs. As the sweep line moves, arcs grow and shrink. When two arcs pinch off, a Voronoi vertex is found. A parabola is the locus of points equidistant from a point (site) and a line (sweep line).

Scheme

Applications

Voronoi diagrams answer "which is closest?" for any set of facilities. Post offices, hospitals, cell towers, franchise territories. In computational geometry, they solve the nearest-neighbor problem, the largest empty circle problem, and serve as the foundation for Delaunay triangulations (the dual graph).

Scheme
Neighbors

Geometry chapters

Cross-references

Foundations (Wikipedia)

Translation notes

Fortune's algorithm is described conceptually here, not implemented. A full implementation requires a priority queue for site and circle events, and a balanced BST for the beach line. The Voronoi SVG is schematic: real Voronoi cells would have edges that are exact perpendicular bisectors. The nearest-site code uses brute-force O(n) lookup per query; a real Voronoi structure enables O(log n) point location.