IB Maths AI SL Topic 3 — Voronoi Diagrams Paper 1 & 2 Cells & boundaries ~7 min read

Drawing Voronoi Diagrams

A Voronoi diagram divides a region into cells around a fixed set of sites. Each cell contains every point that is closer to its site than to any other. The boundaries are perpendicular bisectors of pairs of sites — same tool you used in the geometry chapter. AI SL won’t ask you to draw a diagram from scratch, but you must understand how it’s built, find equations of edges, and complete or modify an existing diagram.

📘 What you need to know

The anatomy of a Voronoi diagram

Three sites, three cells — vertex equidistant from all three AB AC BC A B C V cell A cell B cell C
Three sites A, B, C generate three cells. Each edge is a segment of a perpendicular bisector of the two sites either side of it. The orange vertex V is where all three edges meet — the unique point equidistant from all three sites.
Edge equation: same as perpendicular bisector midpoint of A(x1, y1) and B(x2, y2):   (x1+x22, y1+y22)
 
perpendicular gradient:  m = − x2x1y2y1   ·   line: yMy = m(xMx)

🧭 Recipe — working with a Voronoi diagram

  1. Identify the relevant pair (or three) of sites: an edge involves two sites, a vertex involves three.
  2. For an edge equation: find the midpoint and the perpendicular gradient of the two sites that share it — identical to the perp-bisector recipe.
  3. For a vertex: find two perpendicular bisectors that meet at it, then solve them simultaneously. (GDC’s system solver helps.)
  4. To check which cell a point belongs to: compute the distance from the point to each site — the smallest wins.
  5. To find a missing site: reflect a known neighbouring site across the shared edge, OR use the property that points on the edge are equidistant from both sites.
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 1

Which 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 2

Equation 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 3

Show 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 4

Find 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 5

Equation 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 6

Find 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 →