Skip to content

LTMullineux/Pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Pi

Estimating pi with p5.js and Monte Carlo sampling.

  • Points are randomly sampled from inside a square with side length 2r.
  • The total number of points = N_total.
  • Points that fall inside the circle with radius = r that lies inside the square are tallied = N_inside.
  • Pi is then estimated as pi = 4 * N_inside / N_total.

About

Estimating pi with p5.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published