Partition the plane by “which site is nearest”. The Voronoi cell of a site is

Each cell is a convex polygon (possibly unbounded) — the intersection of the half-planes defined by the perpendicular bisectors to every other site.

Structure

For sites in general position:

QuantityValue
Cells
Edges
Vertices
Total complexity

Voronoi vertices are circumcentres of triples of sites, and each is equidistant from three sites with no fourth inside that circle.

Construction

MethodTimeNote
Half-plane intersection per cellsimple, fine for
Fortune’s sweepthe classic; a parabolic beach line
Dual of Delaunaybuild Delaunay, then take the dual
Lift to 3D + convex hullelegant; via the paraboloid
Divide and conquer

Build Delaunay instead

The Voronoi diagram and the Delaunay triangulation are duals: a Voronoi edge separates two sites exactly when those sites are joined by a Delaunay edge. Delaunay is easier to construct (Bowyer-Watson is ~40 lines) and easier to store, so build it and dualise if you need the Voronoi structure explicitly.

The duality in detail

VoronoiDelaunay
cell (a site)vertex
edge (between 2 cells)edge
vertex (meeting of 3 cells)triangle
unbounded cella hull vertex
Voronoi vertex positionthe triangle’s circumcentre

What it answers

QueryVia Voronoi/Delaunay
Nearest site to a query pointpoint location in the Voronoi diagram,
Closest pairthe shortest Delaunay edge
Euclidean MSTa subgraph of Delaunay — run Kruskal on edges
Nearest neighbour grapha subgraph of Delaunay
Largest empty circlecentred at a Voronoi vertex (or on the hull boundary)
Farthest-point Voronoigives the minimum enclosing circle
All nearest neighboursone pass over Delaunay edges
Motion planning with maximum clearancetravel along Voronoi edges

The Euclidean MST reduction is the most valuable: it takes an complete-graph problem down to .

Variants

  • Weighted (power) Voronoi — cells defined by ; still polygonal, dual to the regular triangulation.
  • Multiplicatively weighted — cells bounded by Apollonius circles, no longer polygonal.
  • Farthest-point Voronoi — “which site is farthest”; only hull vertices have non-empty cells.
  • Order- Voronoi — regions with the same set of nearest sites.
  • Voronoi under / — cells are still polygonal but with axis-parallel and diagonal edges.
  • Voronoi of segments — cells bounded by parabolic arcs; substantially harder.

In competitive programming

Explicit Voronoi construction is rare — it is long, precision-sensitive, and usually avoidable. The three things worth knowing:

  1. Nearest-site queries → a KD-tree is simpler and fast enough.
  2. Euclidean MST → build Delaunay, then Kruskal.
  3. Largest empty circle → its centre is a Voronoi vertex, a hull edge midpoint, or determined by the bounding region; enumerate the candidates.

For small , the per-cell half-plane intersection is entirely acceptable and far easier to get right.

See also: Delaunay Triangulation · Fortune’s Algorithm · Half-Plane Intersection