impera Open Impera

IB Diploma Mathematics AI · Geometry and trigonometry

Voronoi diagrams

1What a Voronoi diagram is

A Voronoi diagram splits a region into cells around a set of points called sites. Each cell contains every point that is closer to its site than to any other site.

  • Sites: the given points, such as shops, hospitals or weather stations.
  • Edges: the boundaries between cells. Every point on an edge is the same distance from two sites.
  • Vertices: where edges meet. A vertex is the same distance from three (or more) sites.

A Voronoi diagram for five sites. The dashed circle around a vertex passes through A, B and C

Example

If the sites are schools, the cell around a school shows the homes for which that school is the nearest.

Check yourself

What is true of every point in the cell of site A?

  • It is closer to the edge than to A

  • It is the same distance from every site

  • It is closer to A than to any other site

  • It is farther from A than from any other site

Show the answer

It is closer to A than to any other site

That is the definition of a Voronoi cell.

2Edges are perpendicular bisectors

The edge between two sites lies on their perpendicular bisector: the line through the midpoint of the two sites, at right angles to the line joining them.

Worked example

An edge between two sites

  1. Sites $A(1, 2)$ and $B(5, 4)$.
  2. Midpoint: $(3, 3)$.
  3. Gradient of $AB$: $\frac{4 - 2}{5 - 1} = 0.5$, so the perpendicular gradient is $-2$.
  4. Perpendicular bisector: $y - 3 = -2(x - 3)$, so $y = -2x + 9$.

In exams you may be asked to find this equation, or to complete a partly drawn diagram by adding an edge.

Check yourself

Sites are at (0, 0) and (6, 0). What is the equation of the edge between their cells?

  • x = 3

  • y = x

  • x = 6

  • y = 3

Show the answer

x = 3

The perpendicular bisector is the vertical line through the midpoint (3, 0).

3Vertices and the largest empty circle

A vertex is equidistant from three sites, so it is the centre of a circle passing through all three. No other site lies inside that circle.

The "toxic waste dump" problem asks for the point in a region that is as far as possible from every site, for example the best place for something unpleasant, or a new shop that avoids competitors.

  • The answer is at a vertex of the Voronoi diagram, or on the boundary of the region.
  • Work out the distance from each candidate point to its nearest sites, and choose the largest.
Worked example

Furthest from three towns

  1. Towns at $A(0, 0)$, $B(6, 0)$ and $C(0, 4)$ (km).
  2. The vertex is equidistant from all three: it lies on $x = 3$ (bisector of $AB$) and $y = 2$ (bisector of $AC$), so it is $(3, 2)$.
  3. Its distance to each town: $\sqrt{3^2 + 2^2} = 3.61$ km.
Check yourself

Where is the solution to a largest empty circle problem found?

  • At a vertex of the Voronoi diagram or on the boundary of the region

  • At the centre of the largest cell in the Voronoi diagram

  • At one of the sites, since that is where the cells are centred

  • At the midpoint of the two sites that are closest together

Show the answer

At a vertex of the Voronoi diagram or on the boundary of the region

These are the points furthest from their nearest sites.

4Nearest neighbour interpolation and adding a site

Nearest neighbour interpolation estimates a value at any point by using the value at the site of its cell. For example, the rainfall at a farm is estimated as the rainfall measured at the nearest weather station.

To add a new site to a diagram:

  1. Find which cell the new site lies in.
  2. Draw the perpendicular bisector between the new site and that cell's site.
  3. Continue into neighbouring cells, drawing bisectors with their sites, until the new cell is closed.
  4. Remove the old edges that now lie inside the new cell.

A Voronoi model assumes travel is in straight lines at equal cost, which is not true in a city with roads, rivers and hills. This is a common limitation to mention.

Check yourself

Nearest neighbour interpolation estimates a value at a point using what?

  • The average of the values at all of the sites in the region

  • The value at the site of the cell containing the point

  • The value at the furthest site from the point

  • The value at the nearest vertex of the diagram

Show the answer

The value at the site of the cell containing the point

Each point takes the value of its nearest site.

5Real uses of Voronoi diagrams

Voronoi diagrams divide a region into cells closest to each site.

  • Public services: which hospital or school is nearest to each home.
  • Ecology: territories of animals or the spread of plants.
  • Epidemiology: John Snow's 1854 map of cholera deaths in London showed clustering around the Broad Street water pump, an early example of nearest-site reasoning.
  • Retail: choosing locations for new shops.
Check yourself

Which 1854 investigation is an early example of Voronoi-style reasoning?

  • Darwin's voyage on HMS Beagle to the Galápagos

  • John Snow's cholera map around the Broad Street pump

  • The invention of satellite navigation for ships

  • The first national census of England and Wales

Show the answer

John Snow's cholera map around the Broad Street pump

Nearest water source.

6Finding a perpendicular bisector

Each edge of a Voronoi diagram lies on the perpendicular bisector of two sites.

Worked example

Sites $A(2, 3)$ and $B(6, 7)$

  1. Midpoint: $(4, 5)$.
  2. Gradient of $AB$: $\frac{4}{4} = 1$, so perpendicular gradient: $-1$.
  3. Equation: $y - 5 = -(x - 4)$, so $y = -x + 9$.
  4. Points on this line are equidistant from $A$ and $B$.
Check yourself

What is the gradient of a line perpendicular to one with gradient 2?

  • $-2$

  • $-\frac{1}{2}$

  • 2

  • $\frac{1}{2}$

Show the answer

$-\frac{1}{2}$

Negative reciprocal.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera