Math

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.

6 minLevel 2/3The interactive stage stays ad-free.
Sites14Cells14Closest pair28.9 pxBoundaryperpendicular bisector

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

1

Each site owns the region closer to it than to any other site.

2

Cell boundaries are perpendicular bisectors of pairs of nearby sites.

3

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.