You are on page 1of 22

Investigating the most appropriate method to construct a Voronoi diagram, the closest gyms to student

residences, in addition to finding the most appropriate position for a new gym within Canton Zug.

Mathematical exploration into Voronoi diagrams

October 2022

1
Introduction

My interest in Voronoi diagrams came from analysing patterns of urban settlements in geography class,

specifically an article that investigated urban spatial structure such as land use in urban areas, and

arrangement of public and private space in Wuhan, China by applying spatial data to construct Voronoi

diagrams. This article highlighted that in recent decades there have been “unprecedented urban landscape

changes, loss of ecosystems and biodiversity and the exploration of available resources” (Zhou, 2016).

Investigating a spatial structure can help governments determine whether policies must be put in place to

manage factors such as planning for sustainable urban land use and protection.

In regard to my own investigation, I chose to apply this concept that could help students find the

gym that is closest to their homes, in addition to what would be the best location to add a new gym using a

Voronoi diagram. As IB students, we must be efficient and manage our time well. For example, a year ago I

joined the popular Migros Fitness gym in Zug, yet in terms of travel time this was not convenient as I live

half an hour away and thus this journey fed into my precious study time. This sparked my idea of

constructing a Voronoioi diagram to help students spend their time efficiently. Making a Voronoi diagram

that contains gyms within each town in Zug can help students find the gym closest to their homes and

prevent students from commuting unnecessary long hours.

For proportion, I chose each town within Zug, as after chatting with students at the school, I found that most

live within this Canton, thus Zug will be appropriate for my investigation.

Aim

The aim of this investigation is to explore Voronoi diagrams to determine where to place a new gym in Zug.

1. To help students find the closest gym to their home in Zug, represented through a Voronoi diagram

constructed on the satellite picture of Zug. With existing gyms represented as sites, an interpolation

of a Voronoi diagram is done to find the nearest gyms to their homes.

2. To find the best position for a new gym, by using the largest empty circle on the Voronoi diagram. If

there is a practical challenge in building a new gym in the found position then I will find the next

possibility by considering the next largest empty circle.

Procedure

2
1. To find the gym in each town, the Voronoi diagram is constructed on the satellite picture of Zug.

With existing gyms represented as sites, an interpolation of a Voronoi diagram is done to find the

nearest neighbourhood.

2. To find the best position for a new gym, by finding the largest empty circle on the Voronoi diagram.

If there are practical challenges with this new gym, then the following largest circle will be

considered.

Terminology

● Sites → A set of points in a plane (of particular interest)

● Cells → A polygon containing each site

● Edges → The boundary lines of the cells

This kind of pattern with a

polygon (cells) and one site in

each cell is known as Voronoi

Diagram.

Figure 1: Demonstration of the

terminology of a Voronoi diagram

3
Definition of Voronoi diagram

A Voronoi diagram is a way of partitioning space into a number of regions. (Harrison, 2020)

Where do Voronoi diagrams occur?

In nature, some special patterns can be observed, such as when mud dries, spots on a giraffe, and soap

bubbles when they touch each other. This can be demonstrated with expanding circles.

Figure 2: Expanding circle illustration Figure 3: Expanding circles into a Voronoi diagram

4
Here are 5 sites of circles expanding to form a Voronoi

diagram.

Figure 4: 5 expanding circle illustration

As the circles expand they emerge/squish together to become

polygons. In this pattern, edges are equidistant from the

sites.

Figure 5: Demonstration of the circles in

the process of expanding and becoming a

Voronoi diagram Edge L is equidistant from A and B and any line that is

equidistant from two given points is the perpendicular

bisector of those points. Hence the edges are perpendicular

bisectors of each

pair of sites. The equidistant means it is the perpendicular

bisector of those points. I will investigate expanding circles

as an efficient way to construct a Voronoi diagram further on


Figure 6: Demonstration of the final in the investigation.
Voronoi diagram

5
MATHS PROCESSES

How to construct a Voronoi diagram

As part of my aim is to construct a Voronoi diagram representing gyms around Zug, I need to investigate the

most effective way to do this. It is relevant to highlight that ‘effective’ is defined by success in producing a

desired or intended result in the most efficient way, hence I will select the most efficient method that works

the best when dealing with a great number of sites.

Method 1: Using Midpoints, Slopes and Lines.

The midpoint of a line

The midpoint is important when constructing a Voronoi diagram as this reciprocal relationship will have the

same midpoint.

Given two sites A(x1,y1) and B(x2,y2), we have to draw an edge that contains all points that are

equidistant from both sites. The edge will be a perpendicular bisector.

Here is how to draw it:

( )
x 1+ x 2 y 1+ y 2 1. Find the midpoint between A and B
( x , y )= ,
2 2

( )
y 1− y 2 2. Find the slopes between A and B
(x , y )=
x 1−x 2

( )
y 1− y 2 3. Perpendicular slope
(x , y )=−
x 1−x 2

y=mx+b 4. Use the midpoint and the perpendicular slope to

6
write the equation of the line

5. Then remove the parts of the edges that are closer

to a third site than the two sites in its name

Figure 7: Image of the perpendicular

bisector of AB

Repeat this process with all pairs of sites. When using the points of intersection of the perpendicular bisector,

only draw the edges of the non-overlapping convex polygons.

Illustration 1: Voronoi diagram with three sites using Midpoints, Slopes and Line by hand.

Figure 8: Screenshot taken of my hand drawn Voronoi diagram

7
A (2,2) Midpoint Slope PB Slope

B (3,6)

( ) −1
AB 5 4
C (8,4)
,4
2 4

( ) −2 5
BC 11
,5
2 5 2

CA ( 5 , 3) 1 −3
3 1

After performing this method, I have come to conclude that calculating midpoints, slopes and lines then

constructing a Voronoi diagram by hand is effective when dealing with fewer sites to consider in the Voronoi

diagram.

Method 2: Using circles with a protractor to draw a perpendicular bisector of the Voronoi diagram

How to draw a perpendicular bisector with a protractor

1. Consider any two sites A(x,0) and B(0,x)

2. Draw the line joining AB

3. Using a compass draw an arc from A with a radius of more than half the midpoint of a line segment

AB

4. Similarly, draw an arc from B with a radius of more than half the midpoint of line segment AB

5. Mark the points of intersection of the arc and draw a line connecting the intersection points

6. This line is the perpendicular bisector of AB.

8
Illustration 2: Perpendicular bisector using two points

Figure 9: Image was taken of my hand-drawn Figure 10: Final image of perpendicular bisectors

perpendicular bisector using a compass

Illustration 3: Bisector using three points

Figure 12: Use of compass to draw outline for


Figure 11: 3 sites forming an isosceles triangle
perpendicular lines

Figure 13: Perpendicular bisector through compass


Figure 14: Understanding why this forms
outline
perpendicular bisector

Looking at figure 14, we can confirm that this is a perpendicular bisector as for example side AC’s bisectors

9
segment divides it into two equal parts and is perpendicular to it. This occurs similarly with sides BC and

AB. Interestingly as the angle bisectors of all of the angles of a triangle meet at a point, I wasn’t sure this

would be the case for the perpendicular bisectors. However, it is as we found out that all of the perpendicular

bisectors meet at the circumcenter.

Overall although this method is credible, it is demanding and takes time to construct and therefore will not be

an efficient method to construct a Voronoi diagram with numerous sites. (Mcconnell, 2021)

Method 3: Voronoi diagram using expanding circles in Geogebra

GeoGebra is a mathematics software that brings together geometry, algebra, spreadsheets, graphing, statistics

and calculus in one engine. Using this technology is an effective method to construct a Voronoi diagram

when working with multiple sites.

As we investigated on page 4 with expanding circles, I wanted to construct a Voronoi diagram using

GeoGebra.

Illustration 4: Expanding circle with two sites in Geogebra

Figure 15: Screenshot of expanding circle, digitally made on Geogebra

A line segment bisector intersects the midpoint of the segment AC.

10
This corresponds to line segment DE that intersects F - making the perpendicular bisector. D and E are equal

distance away from midpoint F. Therefore the perpendicular bisector of a segment has the property that each

of its points are equidistant from the segment's endpoints

Figure 15: Screenshot of drawn isosceles triangle within the expanding circle

Similarly to method 2 and the isosceles triangle, we can distinguish isosceles triangles within the expanding

circles, as if we look at C, it is the centre of the circle and we are going to draw a line from C perpendicular

to this chord, line h bisects the chord and this can be proven by joining C to the endpoint of the chord. The

dotted lines are the radii of the circle. By construction, we have two right-angle triangles. From Pythagoras

theorem, the longest side of the hypotenuse (r^2) is equal to the length of the adjacent and opposite sides.

Similarly with right angle triangle 2. To prove that D is the same length as E from the midpoint (d=e) we can

rearrange the Pythagorean theorem. (KeysToMaths1, 2013)

1 right angle triangle 2 2 2


r =h + d

→ r 2−h2 = d 2

2 right angle triangle 2 2 2


r =h + e

→ r 2−h2 = e 2

Therefore e is equal to d e=d

Now that it is clear that expanding circles is a credible and efficient method to create a Voronoi diagram.

Here is an illustration with an expanding circle on GeoGebra using 4 sites.

11
Illustration 5: Expanding circle with 4 sites on GeoGebra

Figure 16: 4 sites using GeoGebra


Figure 17: Expanding circle for the 4 sites using

GeoGebra

Figure 18: Final perpendicular bisectors using GeoGebra

By looking at figure 18, this confirms that method 3 works effectively on multiple sites to form a Voronoi

diagram.

12
Constructing a Voronoi diagram with gyms in Zug

I will construct a Voronoi diagram by using method 3 GeoGebra as this was the most efficient method when

dealing with multiple sites.

The purpose of constructing this diagram will help me investigate Aim 1 (finding the nearest gym to

student residences on Voronoi Diagram) and Aim 2 (finding the best position for a new gym).

This image illustrates a google map with gyms, the sites are highlighted with stars

Figure 19: Google map screenshot of Zug with starred gyms

SCALE TO MAP - 1 square = 1 mile

(This scale applies to the following figures: 19, 20, 21, 22, 23, 24,

25, 26, 27 & 28)

Table showing the coordinates of each gym on figure 19

13
Point (corresponding to the location of each gym)

E (13.5,29.7) J (52.7, 52.1)

D (13.6, 21.6) I (40.8, 44.6)

C (37.7, 2.4) H (38.8, 36.0)

L (55.7, 20.2) G (28.1, 41.3)

K (61.6, 37.1) F (25.2, 42.2)

This image illustrates a google map with gyms, the sites are highlighted with stars

Figure 20: Voronoi diagram made with GeoGebra

14
AIM 1 - Finding the nearest gym to student residences on the Voronoi diagram

In relation to aim 1, with given residence coordinates I can find the closest gym located by using the Voronoi

diagram.

To investigate my aim I asked 5 students at the School where they lived in comparison to Figure 20.

Figure 21: Map with the plotted coordinates for student residences

15
The closest gym in relation to student houses

House and coordinates Type of gym

H1 (21,21) D

H2 (22,42) F

H3 (40,39) H

H4 (69,19) L

H5 (56,46) J

This table displays the closest gym in respect to each house. For example, H3 lies within cell H. Therefore

this student should attend gym H as it is the closest and most convenient in terms of where they live.

AIM 2 - Finding the best position for a new gym using a Voronoi diagram

The nearest neighbour interpolation allows us to find the nearest site (gym) for a particular coordinate. As

Zug is one of the smallest Swiss Cantons in terms of area, small towns within Zug are likely to not be

considered when building facilities. Therefore I want to investigate where the largest area of Zug requires a

new gym.

How to add a new site to the existing Voronoi diagram

1. To add a new site first find the largest empty circle, as we want the new site furthest distance from

the near sites

2. The corners of the edges of the cells are called “vertices”. The point where the edges meet.

3. Each vertex will be equidistant to three nearby sites. Hence it is the centre of the circle through those

sites

4. Check each vertex and find out which is the largest circle

5. The vertex of the largest circle can be considered the new site.

16
After observing figure 20, it seems as if there is a lot of land that does not have a gym nearby. Let’s find the

most appropriate position for a new gym.

This image illustrates a new possible position for a gym (in pink - M1, M2, M3, M4, M5) within Zug and its

towns using a Voronoi diagram.

Figure 22: Imagine of Voronoi diagram constructed on GeoGebra withdrawn sites of new potential gyms

By looking at the Voronoi diagram it is evident that Vertices M1, M2, M3, M4, and M5 are the centre point

of circles that are furthest from the closest gym. Thus I need to find the circle with the largest diameter with

no gym and this will be the position of the new gym. To find out which sites the new gym will be located,

circles must be constructed to find out which has the largest diameter.

17
For this I need to find the radius of each circle;

Consider M1 (30.1, 18.6), after drawing a circle I found that the nearest gym to M1 is H (38.8, 36.0). The

radius of this circle with centre M1 is M1H. The length of the radius is found by using the distance formula.

√❑

r =19.5

(This process is completed for the rest of the sites)

Table showing my process of working out the greatest empty circle.

Vertex (new Site Radius

position)

M1 H 19.5

Figure 23: #1 largest empty circle

18
M2 L 16.2

Figure 24: #2 largest empty circle

M3 K 11.8

Figure 25: #3 largest empty circle

M4 I 10.8

19
Figure 26: #4 largest empty circle

M5 J 10.3

Figure 27: #5 largest empty circle

After finding the radius of each site, it is evident that the best position is M1 because it is the centre of the

largest possible circles with a radius of 19.5. However, M1 is located in Zug lake. This will not be an optimal

location to construct a new gym due to difficulties with transportation and simple architectural limitations as

this point is located within Zug lake. Therefore the next best position is M2 as that is the next largest circle,

this is an appropriate position as it is not a mountainous region and it is located on land.

20
Image showing the new Voronoi diagram with site M being the new site for potential gym M2.

Figure 28: Voronoi diagram constructed on GeoGebra with the new gym site

CONCLUSION

In this investigation I explored what gyms are closest to student residences and found a prime location for a

new gym. I achieved this by firstly learning how to construct a Voronoi diagram by testing 3 different

methods. The first method was constructing a Voronoi diagram by hand using midpoints, slopes and line.

The second was using circles with a protractor to draw a perpendicular bisector and the final third method

was using expanding circles in Geogebra. After demonstrating this understanding, I applied this knowledge

back to the investigation and created a Voronoi diagram (Figure 20) using the third method as I found it to be

the most efficient method. After creating this diagram, it was evident by simply observing the diagram that

there are areas within Zug that do not have any gyms nearby, therefore I extended my aim and find out where

a new gym could be positioned. I did this by finding the largest empty circle, which was originally M1

(Figure 23), however, at this suggested locating of the gym within lake Zug, I chose the next best possible

location M2 (Figure 24). I then created a new Voronoi diagram with this new gym site.

21
For a future investigation, I hope to construct a Voronoi diagram without considering lake Zug, so that the

data only represents land, this could be a fascinating contrast between using lake Zug in the diagram and

without. In addition, I could include more areas by considering Canton Zurich and Luzern.

References

All things statistics. (2021, December 20). Perpendicular Bisector – Simple Explanation & Construction. All

things statistics. Retrieved May 20, 2022, from

https://allthingsstatistics.com/miscellaneous/perpendicular-bisector-definition-construction/

GeoGebra [Computer software]. (n.d.). https://www.geogebra.org/

Google Maps [Computer software]. (2022). https://www.google.co.uk/url?

sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjm6bqancv6AhUJwAIHHW8MDaYQF

noECAkQAQ&url=https%3A%2F%2Fmaps.google.com

%2F&usg=AOvVaw3z2z03MnvIwD2K6kwtdD9z

Harrison, B. (2020). Voronoi Diagram. ScienceDirect. Retrieved October 1, 2022, from

https://www.sciencedirect.com/topics/earth-and-planetary-sciences/voronoi-diagram

KeysToMaths1. (2013, March 18). Perpendicular Bisector of a Chord [Audio recording]. YouTube.

https://www.youtube.com/watch?v=3ufhcHzOXAk

Mathispower4u. (2011, May 2). Constructing the Perpendicular Bisectors of the Sides of a Triangle [Audio

recording]. YouTube. https://www.youtube.com/watch?v=Wvx53scImwk

Mcconnell, R. (2021, December 12). Perpendicular Sides, Line Segments & Shapes. Study.com. Retrieved

October 1, 2022, from https://study.com/learn/lesson/perpendicular-sides-shapes-line-segments-

examples.html

StudyPug. (n.d.). Perpendicular line proofs - Angles and Lines.

https://www.studypug.com/geometry-help/perpendicular-line-proofs

WolframMathWorld. (2022, May 13). Perpendicular Bisector. WolframMathWorld. Retrieved May 29,

2022, from https://mathworld.wolfram.com/PerpendicularBisector.html

Zhou, Q. (2016, July 15). Integrating Spatial and Attribute Characteristics of Extended Voronoi Diagrams in

Spatial Patterning Research: A Case Study of Wuhan City in China. MDPI. Retrieved September 23,

2022, from https://www.mdpi.com/2220-9964/5/7/120

22

You might also like