Skip to content

Gives an animated approximation of pi with pseudo random numbers

Notifications You must be signed in to change notification settings

timothypholmes/monte-carlo-pi-approximation

Repository files navigation

monte-carlo-pi-approximation

Gives an animated approximation of pi with pseudo random numbers Gives an animated approximation of pi with pseudo-random numbers

Animation of Psuedo Random Numbers

pi

The Theory

The area of a circle is given by

/begin{equation} /pi r^{2} /end{equation}

The number of points that are generated inside the circle divided by the total number of generated points multiplied by 4 will give us our approximation of $/pi$. Thus, we have

/begin{equation} /pi /approx 4/frac{N_{inner}}{N_total}} /end{equation}

Releases

No releases published

Packages

No packages published

Languages