How to compute 'pi' with a gun [Comment calculer 'pi' avec un fusil].

It suffices to use a square target with an inscribed circle inside. Then shoot randomly the target. In this picture there are NG=20692 shots inside the circle (Green points) and NR=5719 outside (Red points). The full square contains NG+NR=20692+5719=26411 points (Green and Red).

R being the circle radius, the areas of the circle and the square are respectively:

```                            2
C = pi*R
```

```                             2
S = (2*R)
```

K being a certain constant, C and S can be approximated using the point numbers:
```
C ~ K*NG
```
```
S ~ K*(NG+NR)
```
Hence:
```                                2
C      pi*R      pi
--- = -------- = ----
S          2     4
(2*R)
```

```                            C          K*NG         20692
pi = 4*--- ~ 4*----------- = 4*------- = 3.13
S       K*(NG+NR)       26411
```

assuming a perfect random process...

(CMAP28 WWW site: this page was created on 09/08/2021 and last updated on 12/27/2021 14:13:20 -CET-)

[See the generator of this picture [Voir le générateur de cette image]]

[See all related pictures (including this one) [Voir toutes les images associées (incluant celle-ci)]]

[Please visit the related ImagesDidactiques picture gallery [Visitez la galerie d'images ImagesDidactiques associée]]
[Please visit the related NumberTheory picture gallery [Visitez la galerie d'images NumberTheory associée]]

[Go back to AVirtualMachineForExploringSpaceTimeAndBeyond [Retour à AVirtualMachineForExploringSpaceTimeAndBeyond]]

[The Y2K Bug [Le bug de l'an 2000]]

[Site Map, Help and Search [Plan du Site, Aide et Recherche]]
[Mail [Courrier]]
[About Pictures and Animations [A Propos des Images et des Animations]]