A vertex is the unique point equidistant from THREE sites. An edge is the set of points equidistant from
two sites. A cell is closer to
one site than to any other. These three definitions answer almost every Voronoi question.
Worked examples
WE 1Which cell does a point belong to?
A Voronoi diagram has three sites: P(2, 3), Q(8, 4), R(5, 8). Which cell does the point T(4, 5) belong to?
Compute distance from T to each site
TP = โ((4โ2)ยฒ + (5โ3)ยฒ) = โ(4+4) = โ8 โ 2.83
TQ = โ((4โ8)ยฒ + (5โ4)ยฒ) = โ(16+1) = โ17 โ 4.12
TR = โ((4โ5)ยฒ + (5โ8)ยฒ) = โ(1+9) = โ10 โ 3.16
Pick the smallest
TP < TR < TQ โ P is closest
T is in cell P
“closest site” is the literal definition of which cell a point belongs to. No fancy geometry needed โ just three distance calculations and pick the smallest.
WE 2Equation of an edge — basic case
Sites A(1, 3) and B(7, 5) are neighbours in a Voronoi diagram. Find the equation of the edge between cells A and B.
Step 1 โ midpoint
M = ((1+7)/2, (3+5)/2) = (4, 4)
Step 2 โ gradient AB
m_AB = (5โ3)/(7โ1) = 2/6 = 1/3
Step 3 โ perpendicular gradient
m⊥ = โ1/(1/3) = โ3
Step 4 โ line through M with gradient โ3
y โ 4 = โ3(x โ 4)
y = โ3x + 12 + 4 = โ3x + 16
3x + y โ 16 = 0 (or y = โ3x + 16)
an edge in a Voronoi diagram IS a perpendicular bisector โ exactly the recipe from the earlier note. Check: midpoint (4,4) โ 3(4) + 4 โ 16 = 0 โ
WE 3Show a point lies on an edge
Sites P(2, 4) and Q(8, 2) are neighbours. Show that the point M(5, 3) lies on the edge between cells P and Q.
A point is on the edge โ equidistant from both sites
Compute MP
MP = โ((5โ2)ยฒ + (3โ4)ยฒ)
= โ(9 + 1) = โ10
Compute MQ
MQ = โ((5โ8)ยฒ + (3โ2)ยฒ)
= โ(9 + 1) = โ10
Compare
MP = MQ = โ10 โ equidistant
M is on the edge between cells P and Q โ
“equidistant from two sites” is the DEFINITION of being on an edge. Same calculation, just two distances instead of three.
WE 4Find the vertex of three cells
A Voronoi diagram has three sites: A(0, 0), B(6, 0), C(0, 8). Find the coordinates of the vertex where the three cells meet, and verify that it is equidistant from all three sites.
Step 1 โ โฅAB (horizontal segment โ vertical bisector)
midpoint of AB = (3, 0)
โฅAB: x = 3
Step 2 โ โฅAC (vertical segment โ horizontal bisector)
midpoint of AC = (0, 4)
โฅAC: y = 4
Step 3 โ intersect
vertex V = (3, 4)
Step 4 โ verify equidistance
VA = โ(9+16) = โ25 = 5
VB = โ(9+16) = 5
VC = โ(9+16) = 5 all equal โ
V = (3, 4), equidistance = 5
choosing axis-aligned sites (A on origin, B on x-axis, C on y-axis) makes the perpendicular bisectors AXIS-ALIGNED โ instant intersection. (3, 4, 5) Pythagorean triple appears.
WE 5Equation of an edge — in ax + by + d = 0 form
A Voronoi diagram has sites P(3, 1) and Q(7, 9) as neighbours. Find the equation of the edge between cells P and Q in the form ax + by + d = 0 with integer a, b, d.
Step 1 โ midpoint
M = ((3+7)/2, (1+9)/2) = (5, 5)
Step 2 โ gradient PQ & perpendicular gradient
m_PQ = (9โ1)/(7โ3) = 8/4 = 2
m⊥ = โ1/2
Step 3 โ line through M
y โ 5 = โ1/2(x โ 5)
Step 4 โ multiply by 2, rearrange
2(y โ 5) = โ(x โ 5)
2y โ 10 = โx + 5
x + 2y โ 15 = 0
x + 2y โ 15 = 0
to convert to integer ax+by+d form: multiply by the denominator of any fraction (here 2) to clear it, then collect on one side. Check: midpoint (5,5) โ 5 + 10 โ 15 = 0 โ
WE 6Find a missing site from an edge equation
The edge between cells A and B has equation y = x + 1. Site A is at (0, 3). Find the coordinates of site B.
Two facts about the edge
(i) midpoint of AB lies on the edge y = x + 1
(ii) AB is perpendicular to the edge
Step 1 โ gradient of edge = 1, so m_AB = โ1
let B = (a, b)
m_AB = (b โ 3)/(a โ 0) = โ1
b โ 3 = โa โ b = 3 โ a
Step 2 โ midpoint M = (a/2, (3+b)/2) lies on y = x + 1
(3 + b)/2 = a/2 + 1
3 + b = a + 2 โ b = a โ 1
Step 3 โ equate the two expressions for b
3 โ a = a โ 1
2a = 4 โ a = 2, b = 1
B = (2, 1)
two conditions, two unknowns. Alternatively: REFLECT A(0,3) across the line y = x + 1. Reflection of (0,3) over y = x + 1 gives (2, 1). Same answer.
๐ก Top tips
- Voronoi edges = perpendicular bisectors. Once you’ve internalised that, every “find the equation” question becomes the same 4-step recipe.
- A vertex = intersection of two perpendicular bisectors. Use the GDC’s system solver for non-trivial cases.
- Axis-aligned sites (on axes / origin) give axis-aligned bisectors — instant intersection. Look for this shortcut.
- To check which cell a point is in: distances. Smallest wins. Never use the edge equations — too easy to slip.
- Use light dashed pencil for construction lines; ink the final cell boundaries. AI SL won’t ask for full freehand construction, but understanding it helps with the “complete the diagram” questions.
โ Common mistakes
- Using the gradient of AB as the edge gradient: edges are PERPENDICULAR to AB. Flip and negate the gradient.
- Using A or B as the point in the line equation: the edge passes through the MIDPOINT of AB, not through either site.
- Forgetting that a vertex is equidistant from three sites: not just two. Always verify with at least three distance checks.
- Confusing edge equation with cell-membership test: edges contain equidistant points; cells contain closer-than-others points. Different questions need different methods.
- Wrong form requested: “y = mx + c” vs “ax + by + d = 0″ — read the question carefully and convert at the end.
Up next: Interpreting Voronoi Diagrams. Reading information OFF a given diagram: which site does a coordinate belong to? How far is it from its nearest site? Can the data from one site be used to predict the behaviour of another (nearest-neighbour interpolation)? Same tools (distance + cell-membership), applied to real-world questions.
Need help with AI SL Voronoi Diagrams?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.
Book Free Session →