Box-Muller Algorithm

Description

$x_1$ and $x_2$ are two independent $uniform(0,1)$ random variables, and let

Then

are independent $normal(0,1)$ random variabls.

Polar form

do
$x,y \sim U(0,1)$
while $x^2 + y^2 > 1$