Voronoi Diagrams

Stage 23 of 23 Strand 5 of 5 5 lessons

5 illustrated lessons, each teaching the why before the how.

Start with Voronoi Diagrams in the app →
Revise Voronoi Diagrams with flashcards →

Jump to a lesson

Voronoi Diagrams

The plane cut into nearest-site regions.

A Voronoi diagram cuts the plane into the region of points nearest to each site

Read the full lesson →

AB

Here are two towns, A and B, on the plane. Which points are nearer to A than to B?

AB

The points equally far from A and B make the perpendicular bisector of AB.

AB

That bisector splits the plane in two, and every point on the A side is nearer to A.

ABCD

With four towns, draw the bisector of every pair and keep, for each town, the piece where it is nearest.

ABCD

Each piece is a cell: every point in it is nearer to that site than to any other.

ABCD

A cell edge is a piece of a bisector, and a vertex is where three cells meet.

Now you

024681012024681012ABCDP

Which town is nearest to the point (9, 9)?

024681012024681012ABCDP

Which town is nearest to the point (2, 3)?

The Equation of a Voronoi Edge

Midpoint, negative reciprocal, and out it comes.

A Voronoi edge is the perpendicular bisector of two sites, taken through their midpoint

Read the full lesson →

012345678012345678AB

Site A is at (1, 2) and site B is at (5, 4). Their boundary is the perpendicular bisector of AB.

0123456780123456782.242.24ABM

The midpoint of AB averages the coordinates: ((1 + 5)/2, (2 + 4)/2) = (3, 3).

0123456780123456782.242.24ABM

The gradient of AB is (4 − 2) ÷ (5 − 1) = 1/2.

012345678012345678AB

A perpendicular gradient is the negative reciprocal: −1 ÷ 1/2 = −2.

012345678012345678ABM

Through (3, 3) with gradient −2: y − 3 = −2(x − 3).

012345678012345678AB

Rearranged, that is y = −2x + 9, and it is the edge between the two cells.

Now you

-2-10123456-2-10123456ABM

What is the equation of the Voronoi edge between A and B?

-2-10123456-2-10123456AB

The gradient of AB is 1/2. What is the gradient of the Voronoi edge?

Finding the Nearest Site

Which cell a point lands in, and what changes.

A point belongs to the cell of whichever site is nearest to it

Read the full lesson →

024681012024681012ABCDP

The point P at (8, 4) lies inside the cell of C, so C is the nearest town to P.

0246810120246810127.286.712.247.28ABCDP

Check it by measuring: the distance to C is the smallest of the four.

ABCDP

If each town records a measurement, such as rainfall, nearest-site interpolation gives P the value recorded at C.

ABCDE

Add a new town E: its cell is every point nearer to E than to any of the older towns.

ABCDE

The cell of E is cut from the neighboring cells, and each of its edges lies on the perpendicular bisector of E and one neighbor.

ABCDE

Adding a site only ever shrinks the cells around it; none of them can grow.

Now you

024681012024681012ABCDP

Which cell does the point (2, 3) fall in?

024681012024681012ABCDP

Rainfall, in mm, is 18 at A, 40 at B, 25 at C and 33 at D. What does nearest-site interpolation give at (8, 4)?

The Toxic Waste Dump Problem

The largest empty circle can sit on the border.

The point furthest from every site is a Voronoi vertex, a corner of the region, or a point where a cell edge meets the border

Read the full lesson →

024681012024681012ABCD

A waste dump has to sit as far as possible from every town. Where should it go?

2.24ABCDP

Inside a cell you can always step farther from the nearest town, so no point inside a cell can be the best.

ABCD

At a Voronoi vertex three cells meet, and three towns are all equally near.

3.6ABCD

The circle through those three towns holds no town inside it: an empty circle.

5ABCD

The other vertex at (7, 7) gives a bigger empty circle, of radius exactly 5.

5.39ABCDcorner

The border has candidates too: the corner (0, 12) is 5.39 from B, its nearest town, farther than either vertex.

6.01ABCD

Where the edge between the C and D cells meets the border, at (12, 16/3), both towns are 6.01 away. That is the best site.

Now you

2.24ABCDP

Why is the best place for the dump never strictly inside a cell?

024681012024681012ABCD

Which Voronoi vertex is the better site for the dump?

The Area of a Voronoi Cell

Find the corners, then it is mensuration.

A Voronoi cell is a polygon, so its area comes from its corners by ordinary mensuration

Read the full lesson →

024681012024681012ABCD

The cell of A is a polygon, so it has an area like any other polygon.

024681012024681012ABCD

Its corners are (0, 0), (6, 0), (6, 4), (4, 6) and (0, 6), read off the axes.

024681012024681012ABCD

Two edges lie on the border of the region, and the other three are pieces of bisectors.

a 6 by 6 square has area 36the slanting edge cuts it offbut the corner (6, 6) is in the cell of D

The cell sits inside a 6 by 6 square with one corner cut off by the edge it shares with the cell of D.

the slice is a right triangle with legs 2 and 2area = 36 − ½ × 2 × 2area = 34

That slice is a triangle of area 2, so the cell covers 36 − 2 = 34 square units.

024681012024681012ABCD

Adding another site would cut into this cell, so its area can only get smaller.

Now you

024681012024681012ABCD

The cell of A has corners (0, 0), (6, 0), (6, 4), (4, 6) and (0, 6). What is its area?

024681012024681012ABCD

What is the area of the gold cell?

Continue your journey in the app — save your progress