File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Change Log / Ray Tracing in One Weekend
2121
2222### The Rest of Your Life
2323 - Fix -- Fix typo of "arbitrary" (#1589 )
24+ - New -- Added a bit more explanation of Buffon's needle problem (#1529 )
2425
2526
2627----------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 9494Estimating Pi
9595--------------
9696The canonical example of a Monte Carlo algorithm is estimating $\pi$, so let's do that. There are
97- many ways to estimate $\pi$, with the Buffon Needle problem being a classic case study. We’ll do a
98- variation inspired by this method. Suppose you have a circle inscribed inside a square:
97+ many ways to estimate $\pi$, with _Buffon's needle problem_ being a classic case study. In Buffon's
98+ needle problem, one is presented with a floor made of parallel strips of floor board, each of the
99+ same width. If a needle is randomly dropped onto the floor, what is the probability that the needle
100+ will lie across two boards? (You can find more information on this problem with a simple Internet
101+ search.)
102+
103+ We’ll do a variation inspired by this method. Suppose you have a circle inscribed inside a square:
99104
100105 ![Figure [circ-square]: Estimating $\pi$ with a circle inside a square
101106 ](../images/fig-3.01-circ-square.jpg)
449454
450455One Dimensional Monte Carlo Integration
451456====================================================================================================
452- Our Buffon Needle example is a way of calculating $\pi$ by solving for the ratio of the area of the
453- circle and the area of the circumscribed square:
457+ Our variation of Buffon's needle problem is a way of calculating $\pi$ by solving for the ratio of
458+ the area of the circle and the area of the circumscribed square:
454459
455460 $$ \frac{\operatorname{area}(\mathit{circle})}{\operatorname{area}(\mathit{square})}
456461 = \frac{\pi}{4}
You can’t perform that action at this time.
0 commit comments