Buffon’s Needle is a famous way to (slowly) estimate .
Here’s a processing.org program to calculate (to keep the math-hipster hatred of -day at a critical point and concave up).
Link to live simulation and code. All variables are easy to change, size of window, length of needle, spacing of lines, etc.
Neat program to write. Funnily enough, the code wasn’t working in the javascript version of processing because javascript didn’t understand the constant TAU. Ha.
note: I got the graph idea at the bottom idea from this sketch, but I never looked at the actual code.
Pingback: 109 – Pi day | 180 Classroom Photos