MontePI
Rough Python implementation of a Monte Carlo method to estimate the value of π
How it Works
This is a simple demonstration of a bruteforce method. The script takes as an input a number for points to generate and outputs π estimation. Its terminal and graphical outputs can be seen in the following screenshot:
TODO
There is a lot to be desired:
- Comments, lots of comments
- Better coding style. Maybe and OOP solution?
- Optimization can be done on the data structures used.
- The use of matplotlib limits the graphing capabilities. Maximum number of points displayed is as of now 1000.
Feel free to contribute.