Buffon's Needle

What is the probablility that a needle of length L,  
    dropped on an infinite piece of paper covered with parallel lines seperated by a gap of length G will land touching a line?

Try to find the probability in the simplest case, where L=G.

hit  =  
      1/2  sin (θ)  ≥  
        D
D  =  0 to 1/2 sep
θ  =  0 to 180

There are two ways to approach the problem.

Method 1:  Compute the probability based on the sum of range of possible values that are hits, as shown below:

Hint : 
      Now might be a good time to learn about the Integrate[] function.

Method 2: Given DropNeedle[] - a function that drops the needle randomly and reports 1 for a hit, 0 for a miss, try to find the probability experimentally.

DropNeedle[g_, 
        l_]  :=  (    
dist  =  Random[]*g/2;    
theta  =  
          Random[Real,   Pi]; 
If[(1/2) 
              Sin[theta] * l  ≥  dist, 1, 
          0]
)

Table[DropNeedle[6, 6], {x, 1, 10}]

Followup questions: How do we extend the result for larger gaps.  What about gaps smaller than the needle length?

The images in this notebook came from George Reese's Buffon's Needle web page at http://www . mste . uiuc . edu/reese/buffon/
          buffon . html