How can I realize this programme? Hello,everyone. 
I am eager to know the solution about this problem! 
It's about statistic. 
I want to use php to realize it ! There is a plane ,and many equidistant lines on it.(the distance between them is a). 
Now throw a needle (the length is L,L 
Compute the possibility of the needle that intersect the arbitrary line. I want to use php to approximate the trial.(Give the value to L and a,use the circulation to simulate the trial and check if the result can correspond to your result that you get above). Thanx,please paste the whole programme.