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
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?
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.
An edge between two sites
- Sites $A(1, 2)$ and $B(5, 4)$.
- Midpoint: $(3, 3)$.
- Gradient of $AB$: $\frac{4 - 2}{5 - 1} = 0.5$, so the perpendicular gradient is $-2$.
- 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?
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.
Furthest from three towns
- Towns at $A(0, 0)$, $B(6, 0)$ and $C(0, 4)$ (km).
- 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)$.
- 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?
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:
- Find which cell the new site lies in.
- Draw the perpendicular bisector between the new site and that cell's site.
- Continue into neighbouring cells, drawing bisectors with their sites, until the new cell is closed.
- 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?
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?
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.
Sites $A(2, 3)$ and $B(6, 7)$
- Midpoint: $(4, 5)$.
- Gradient of $AB$: $\frac{4}{4} = 1$, so perpendicular gradient: $-1$.
- Equation: $y - 5 = -(x - 4)$, so $y = -x + 9$.
- 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?
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