|
|
|
|
| Lecture
15B: Server/Client Physics Simulation |
Buffon's
Needle
by Michael
J. Hurben
|
"Buffon's Needle refers to a simple Monte Carlo method
for the estimation of the value of pi, 3.14159265... The idea is very
simple. Suppose you have a tabletop with a number of parallel lines
drawn on it, which are equally spaced (say the spacing is 1 inch, for
example). Suppose you also have a pin or needle, which is also an inch
long. If you drop the needle on the table, you will find that one of
two things happens: (1) The needle crosses or touches one of the lines,
or (2) the needle crosses no lines. The idea now is to keep dropping
this needle over and over on the table, and to record the statistics.
Namely, we want to keep track of both the total number of times that
the needle is randomly dropped on the table (call this N), and the number
of times that it crosses a line (call this C). If you keep dropping
the needle, eventually you will find that the number 2N/C approaches
the value of pi! " continue at M.
Hurbens Buffon's Needle page.
Source Code
|