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β*y*^{2}) to β(1β*y*^{2}). 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 *x*^{2} + *y*^{2} β€ 1. This is uniform, and the selection condition restricts the final choice to the disc.

Oh, and here are some Pi Day activities.