Skip to main content
100%

Fork of Fork of Value of PI

✓ Published0🌍 Public
CCurran Kelleher
Last edited Aug 4, 2025
Created on Aug 4, 2025

This interactive visualization demonstrates the Monte Carlo method for estimating the value of π. A sky-blue circle is drawn on a square canvas, and users can add 100 randomly placed steel-blue points at a time via a button. The display updates counters for points inside the circle and the total, calculating an estimate of π as 4 times the ratio of inside points to total points. Built with React and D3.js, the app uses D3’s selection API to append SVG circles and calculates distances mathematically to determine whether each point falls within the circle.

AI-generated description
MIT Licensed

Similar vizzes