Pretty neat! However, if you wanted to know the _probability_ of a noodle crossing any line in the long noodle case (L/W > 1), the expression is more complex (and I believe would require an integral) :).
It's interesting that the number of crossings is independent of whether L/W is less than or greater than 1, but the probability of crossings is equal to 2pi * L/W only in the short case. This makes sense since in the short case the noodle can at most cross a single line.
Very cool. I was expecting it to make circles bigger rather than making needles smaller. Take a near-circle consisting of N lines. As N tends to infinity, the near-circle would have a diameter close to N*L/π, so would touch N*L/πW + O(1) lines twice each.
That was a delicious read. I love this kind of mathematical writing.
Why is the simulation always exactly 2 for a closed polygon, but has error for the almost-full circle?
I think it's because only the closed polygon is totationally symmetric, so you don't get errors from the edge case at the edge of the finite sample space. But I'm not sure.
The illustration is missing the more interesting visualization of how linearity of expectation applies to all possible rotations and translations of all segments of the needle/noodle. Each noodle is equivalent to a curve of discs, like a string of pearls. And those pearls do not even need to be connected!
I'm wary of asking questions (my curiosity is bounded), but what changes if you limit the range of allowed angles to multiples of, say, 10°? How about 90°, does pi go away then?