Calculation of π by throwing needles

A simulation of Buffon's needle problem

    
Result
Needle throwing area and Precision
Needles on the floor (canvas is cleared for every 1000 throws)