About the Buffon's Needle: A Pen Through a Window simulation
Throw a pen at a window: what is the chance it goes through without touching a bar? This 3D Buffon's needle simulation builds the answer up from the classic problem. First, needles dropped on a floor ruled with parallel lines cross a line with probability 2l/(πd) — so counting crossings estimates π. Then the floor is ruled both ways like a window lying flat, and a pen must clear bars in both directions: Laplace's formula 1 − (4la − l²)/(πa²).
Then the window stands up and pens fly at it pointing in any direction in space. A pen tilted towards you casts a shorter shadow on the window, so it passes more often: averaging over directions uniform on the sphere gives P = 1 − l/a + 2l²/(3πa²), which is 2/(3π) ≈ 21.2 % when the pen is as long as a pane is wide — the result in the MathBiceps video. Throw 1, 100, 1000 or 10 000 pens with the buttons on the stage and watch the running fraction settle on the formula as the error shrinks like 1/√n, and see why the answer depends on exactly what a random throw means.
Also covers: buffon's needle, buffon needle problem, estimate pi by throwing needles, geometric probability, probability pen through window, laplace grid problem, monte carlo simulation, random orientation in 3d, uniform on a sphere, bertrand paradox, 2/3π, probability integration, jee probability, class 11 probability.





