Computational geometry
Voronoi regions
Scatter a few seed points and the plane divides itself into territories — every location belongs to whichever seed it sits closest to. Drag the points to redraw the borders.
Click empty space to add a point · drag a point to move it · double-click a point to remove it.
Reading the figure
Each coloured cell is one seed's territory: the set of all points nearer to that seed than to any other. Hover over the figure and the dashed probe snaps to your current nearest seed — that single rule, applied to every point at once, is the whole construction.
Where the borders fall
Under straight-line distance, every border sits on the perpendicular bisector between two neighbouring seeds — the exact midline. Drag two points together and the boundary stays square to the segment joining them. Each vertex, where three cells meet, is a point equidistant from three seeds at once.
Changing what "closest" means
The distance control rewrites the geometry without moving a single point. Manhattan distance — travel along axes only, like city blocks — folds the straight borders into staircases and diagonals. Chebyshev distance, the larger of the horizontal and vertical gap, bends them differently again. Same seeds, different notion of near.
Where they show up
Which tower, store, or hospital serves each address; nearest-neighbour classification in machine learning; mesh generation for simulation; and the growth patterns of crystals and packed biological cells. Wherever space is claimed by the nearest source, a Voronoi diagram is hiding underneath.