This project serves as a simple demonstration in Processing to approximate the value of Pi using a Monte Carlo method.
This Processing sketch utilizes a Monte Carlo algorithm to estimate the value of Pi. It generates random points within a square and determines the ratio of points falling inside a quarter-circle inscribed within the square to the total points generated. By leveraging this ratio, an approximation of Pi can be obtained.
To run this project, ensure you have Processing installed on your machine.
- Clone this repository.
- Open the
pi_approximator.pde
file using Processing. - Click the "Run" button within the Processing IDE to execute the sketch.
This project is created as part of a test project to learn Processing. It offers insights into:
- Implementing Monte Carlo methods in Processing.
- Visualizing random point generation and its relation to Pi approximation.
Pi apporximated using the version 2 (more colorful)