|
Pi Calculated using the Monte Carlo Method and Visualized using GD |
In celebration of Pi day I am posting my code for calculating Pi utilizing the MPI libraries in PERL. This script calculates Pi utilizing the Monte Carlo method (further information
here). I have taken this common calculation and incorporated the GD module to visualize the results for the student. Each member performs a set of calculations and then creates a transparent image plotting the points it calculated. Points within the circle are blue, those outside are red. Each member then copies its image to the master where they are merged. Examples of each members image can be seen below and the final image is posted above. Code for this project can be found
here.
|
Points plotted on Node27 |
|
Points Plotted on Node 30 |
No comments:
Post a Comment