Monte carlo $\pi$, how is $\pi$ being deduced here?

61 Views Asked by At

I am following a programming tutorial that has the following slide:

Area of circle $S_c = \pi\times r^2$

Area of square $S_s = 2r \times 2r = 4r^2$

Therefore $\pi = 4S_c/S_s$

Slide

I cannot see how the author has arrived at the calculation for $\pi$ however. Can someone please advise?

1

There are 1 best solutions below

0
On BEST ANSWER

The author says that

  • $\displaystyle S_c=\pi r^2$;
  • $\displaystyle S_s=4r^2$.

Therefore$$\frac{4S_c}{S_s}=\frac{4\pi r^2}{4r^2}=\pi.$$