Skip to content

Commit 11c411d

Browse files
committed
Spell out MC and LV abbreviations
We used MC (Monte Carlo) and LV (Las Vegas) abbreviations in a couple of paragraphs. It's easier to read these out full.
1 parent b697333 commit 11c411d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

books/RayTracingTheRestOfYourLife.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@
6161
programs, then it'll be good to pause and catch you up. There are two kinds of randomized
6262
algorithms: Monte Carlo and Las Vegas. Randomized algorithms can be found everywhere in computer
6363
graphics, so getting a decent foundation isn't a bad idea. A randomized algorithm uses some amount
64-
of randomness in its computation. A Las Vegas (LV) random algorithm always produces the correct
65-
result, whereas a Monte Carlo (MC) algorithm _may_ produce a correct result--and frequently gets it
66-
wrong! But for especially complicated problems such as ray tracing, we may not place as huge a
67-
priority on being perfectly exact as on getting an answer in a reasonable amount of time. LV
68-
algorithms will eventually arrive at the correct result, but we can't make too many guarantees on
69-
how long it will take to get there. The classic example of an LV algorithm is the _quicksort_
70-
sorting algorithm. The quicksort algorithm will always complete with a fully sorted list, but, the
71-
time it takes to complete is random. Another good example of an LV algorithm is the code that we use
64+
of randomness in its computation. A Las Vegas random algorithm always produces the correct result,
65+
whereas a Monte Carlo algorithm _may_ produce a correct result--and frequently gets it wrong! But
66+
for especially complicated problems such as ray tracing, we may not place as huge a priority on
67+
being perfectly exact as on getting an answer in a reasonable amount of time. Las Vegas algorithms
68+
will eventually arrive at the correct result, but we can't make too many guarantees on how long it
69+
will take to get there. The classic example of a Las Vegas algorithm is the _quicksort_ sorting
70+
algorithm. The quicksort algorithm will always complete with a fully sorted list, but, the time it
71+
takes to complete is random. Another good example of a Las Vegas algorithm is the code that we use
7272
to pick a random point in a unit sphere:
7373

7474
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
@@ -84,11 +84,11 @@
8484

8585
This code will always eventually arrive at a random point in the unit sphere, but we can't say
8686
beforehand how long it'll take. It may take only 1 iteration, it may take 2, 3, 4, or even longer.
87-
Whereas, an MC program will give a statistical estimate of an answer, and this estimate will get
88-
more and more accurate the longer you run it. Which means that at a certain point, we can just
87+
Whereas, a Monte Carlo program will give a statistical estimate of an answer, and this estimate will
88+
get more and more accurate the longer you run it. Which means that at a certain point, we can just
8989
decide that the answer is accurate _enough_ and call it quits. This basic characteristic of simple
90-
programs producing noisy but ever-better answers is what MC is all about, and is especially good for
91-
applications like graphics where great accuracy is not needed.
90+
programs producing noisy but ever-better answers is what Monte Carlo is all about, and is especially
91+
good for applications like graphics where great accuracy is not needed.
9292

9393

9494
Estimating Pi

0 commit comments

Comments
 (0)