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 →