Buffon's Needle Montecarlo simulation to calculate pi. t : width of the lines L : length of the needles (L≤t) Space key: reset the needles Red needles cross the line, yellow needles do not. --- 日本語 --- ビュフォンの針 円周率計算のためのモンテカルロシミュレーション t : ラインの幅 L : 針の長さ (L≤t) スペースキー:全ての針をリセット 赤い針はライン交差、黄色の針は交差しないもの
Suppose we have a floor made of parallel strips of wood, each the same width, and we drop a needle onto the floor. What is the probability that the needle will lie across a line between two strips? Red needles lie across and yellow ones not https://en.wikipedia.org/wiki/Buffon%27s_needle_problem #math #pi #simulation #Montecarlo