M
Math Coach Amy
Amy Ferguson Moncure

IB AI · 14B Voronoi Diagrams

Add a Site

A new site takes the points that are closer to it than to the old sites. Compare the squared distances at the point you care about. The new edge is the perpendicular bisector of the new site and a neighbor.

Jump to section:

Closer to the new site means a new cell.

What to Remember

Closer

If the new site is closer, the point changes cell.

Still closer to the old site

The point stays.

Equal

The point is on the new edge.

The edge

That edge is the perpendicular bisector of the new site and the neighbor.

Easy

Easy

Does the point stay?

Example
A point (1, 1) is in the cell of site A(0, 0). A new site B(6, 0) is added. Does the point stay in A’s cell?

Compare the squared distance to A with the squared distance to B.

to A: 2

to B: 26

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

1
A point (5, 1) is in the cell of site A(0, 0). A new site B(6, 0) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 26

to B: 2

B is closer, so the point moves into B’s cell.

Answer: No. It moves to B.

2
A point (2, 2) is in the cell of site A(1, 1). A new site B(7, 1) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 2

to B: 26

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

3
A point (1, 3) is in the cell of site A(0, 2). A new site B(0, 8) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 2

to B: 26

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

4
A point (3, 3) is in the cell of site A(2, 3). A new site B(8, 3) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 1

to B: 25

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

5
A point (1, 0) is in the cell of site A(0, 0). A new site B(4, 6) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 1

to B: 45

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

Medium

Medium

The new boundary.

Example
Sites are at (2, 1) and (6, 5). Find the equation of the boundary that is equidistant from the two sites.

The boundary is the perpendicular bisector.

midpoint = (4, 3)

slope of the segment = 5 − 16 − 2 = 1

perpendicular slope = −1

y − 3 = −1(x − 4)

y = −x + 7

Answer: y = −x + 7

1
Sites are at (0, 0) and (6, 2). Find the equation of the boundary that is equidistant from the two sites.
Show Answer

The boundary is the perpendicular bisector.

midpoint = (3, 1)

slope of the segment = 2 − 06 − 0 = 13

perpendicular slope = −3

y − 1 = −3(x − 3)

y = −3x + 10

Answer: y = −3x + 10

2
Sites are at (1, 4) and (5, 0). Find the equation of the boundary that is equidistant from the two sites.
Show Answer

The boundary is the perpendicular bisector.

midpoint = (3, 2)

slope of the segment = 0 − 45 − 1 = −1

perpendicular slope = 1

y − 2 = 1(x − 3)

y = x − 1

Answer: y = x − 1

3
A point (2, 1) is in the cell of site A(0, 0). A new site B(4, 2) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 5

to B: 5

The distances match, so the point is on the new edge.

Answer: On the edge between A and B.

4
A point (3, 4) is in the cell of site A(3, 1). A new site B(3, 7) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 9

to B: 9

The distances match, so the point is on the new edge.

Answer: On the edge between A and B.

5
A point (3, 3) is in the cell of site A(1, 1). A new site B(5, 5) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 8

to B: 8

The distances match, so the point is on the new edge.

Answer: On the edge between A and B.

Hard

Hard

A tie, or a point that stays.

Example
A point (2, 3) is in the cell of site A(0, 0). A new site B(4, 0) is added. Does the point stay in A’s cell?

Compare the squared distance to A with the squared distance to B.

to A: 13

to B: 13

The distances match, so the point is on the new edge.

Answer: On the edge between A and B.

1
A point (3, 2) is in the cell of site A(0, 0). A new site B(6, 0) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 13

to B: 13

The distances match, so the point is on the new edge.

Answer: On the edge between A and B.

2
A point (2, 2) is in the cell of site A(1, 2). A new site B(5, 6) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 1

to B: 25

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

3
A point (2, 5) is in the cell of site A(0, 4). A new site B(6, 4) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 5

to B: 17

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

4
Sites are at (4, 1) and (8, 7). Find the equation of the boundary that is equidistant from the two sites.
Show Answer

The boundary is the perpendicular bisector.

midpoint = (6, 4)

slope of the segment = 7 − 18 − 4 = 32

perpendicular slope = −23

y − 4 = −23(x − 6)

y = −23x + 8

Answer: y = −23x + 8

5
A point (3, 2) is in the cell of site A(2, 2). A new site B(8, 4) is added. Does the point stay in A’s cell?
Show Answer

Compare the squared distance to A with the squared distance to B.

to A: 1

to B: 29

A is still closer, so the point stays in A’s cell.

Answer: Yes. It stays with A.

Want to go over a Voronoi diagram together?

Book a Session with Amy