Pi Day once more!

In honour of Pi Day (March 14), the chart shows six ways of randomly selecting a point in a unit disc. Four of the methods are bad, for various reasons.

A. Midpoint of random p, q on circumference

p = (cos(πœƒ1), sin(πœƒ1)) is a point on the circumference

q = (cos(πœƒ2), sin(πœƒ2)) is another point on the circumference

x = Β½ cos(πœƒ1) + Β½ cos(πœƒ2) and

y = Β½ sin(πœƒ1) + Β½ sin(πœƒ2), for random πœƒ1 and πœƒ2, define their midpoint.

B. Random polar coordinates

x = r cos(πœƒ)

and y = r sin(πœƒ), for random angle πœƒ and radius r ≀ 1. This gives choices biased towards the centre.

C. Random y, then restricted x

Random y, followed by random x in the range βˆ’βˆš(1βˆ’y2) to √(1βˆ’y2). This gives choices biased towards the top and bottom.

D. Random point on chord in A

Similar to A, but x = a cos(πœƒ1) + (1βˆ’a) cos(πœƒ2)

and y = a sin(πœƒ1) + (1βˆ’a) sin(πœƒ2), for random πœƒ1 and πœƒ2 on the circumference of the circle and random a between 0 and 1. This gives choices biased towards the periphery.

E. Random polar with sqrt(r)

Similar to B, but x = √r cos(πœƒ)

and y = √r sin(πœƒ), for random angle πœƒ and radius r. The square root operation makes the selection uniform across the disc.

F. Random x, y within disc

Random x and y, repeating the choice until x2 + y2 ≀ 1. This is uniform, and the selection condition restricts the final choice to the disc.

Oh, and here are some Pi Day activities.


Pi Day!

Pi Day is coming up again (3/14 as a US date). The number Ο€ is, of course, 3.14159265… Here are some possible activities for children:

  • Search for your birthday (or any other number) in the digits of Ο€
  • Follow in the footsteps of Archimedes, showing that Ο€ is between 22/7 = 3.1429 and 223/71 = 3.1408.
  • Calculate 333/106 = 3.1415 and 355/113 = 3.1415929, which are better approximations than 22/7.
  • Measure the circumference and diameter of a round plate and divide. Use a ruler to measure the diameter and a strip of paper (afterwards measured with a ruler) for the circumference. For children who cannot yet divide, try to find a plate with diameter 7, 106, or 113.
  • Calculate Ο€ by measuring the area of a circle (most simply, with radius 10 or 100), using A = Ο€r2. An easy way is to draw an appropriate circle on a sheet of graph paper.

You can also try estimating Ο€ using Buffon’s needle. You will need some toothpicks (or similar) of length k and some parallel lines (such as floorboards) a distance d apart (greater than or equal to k). Then the fraction of dropped toothpicks that touch or cross a line will be 2 k / (Ο€ d), or 2 / Ο€ if k = d. There is an explanation and simulator here (see also the picture below). And, of course, you can bake a celebratory pie and listen to Kate Bush singing Ο€, mostly correctly!

This picture by McZusatz has 11 of 17 matches touching a line, suggesting the value of 2Γ—17/11 = 3.1 for Ο€ (since k = d).

Actually, of course, Ο€ = 3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 … (digits in red are sung by Kate Bush, accurately, although some have said otherwise).