Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76d8777

Browse files
committed
Merge branch 'dev-patch' into 'dev-minor'
2 parents 5bbf70d + cac1b1a commit 76d8777

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ Change Log / Ray Tracing in One Weekend
1818

1919
----------------------------------------------------------------------------------------------------
2020
# v4.0.1 (in progress)
21-
22-
### Common
2321
- Delete --
2422
- Change --
2523
- Fix --
2624
- New --
2725

26+
### Common
27+
- Fix -- Big improvement to print version listing font size (#1595) and more compact line
28+
height for code listings in both print and browser.
29+
2830
### In One Weekend
31+
- Fix -- Fixed usage of the term "unit cube" for a cube of diameter two (#1555)
2932

3033
### The Next Week
3134

books/RayTracingInOneWeekend.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,9 +2303,9 @@
23032303
3. Invert the normalized vector if it falls onto the wrong hemisphere
23042304

23052305
<div class='together'>
2306-
First, we will use a rejection method to generate the random vector inside of the unit sphere. Pick
2307-
a random point in the unit cube, where $x$, $y$, and $z$ all range from -1 to +1, and reject this
2308-
point if it is outside the unit sphere.
2306+
First, we will use a rejection method to generate the random vector inside the unit sphere. Pick a
2307+
random point in the cube enclosing the unit sphere (that is, where $x$, $y$, and $z$ are all in the
2308+
range $[0,1]$), and reject this point if it is outside the unit sphere.
23092309

23102310
![Figure [sphere-vec]: Two vectors were rejected before finding a good one
23112311
](../images/fig-1.11-sphere-vec.jpg)
@@ -4323,7 +4323,7 @@
43234323
The second book in this series builds on the ray tracer you've developed here. This includes new
43244324
features such as:
43254325

4326-
- Motion blur -- Realistially render moving objects.
4326+
- Motion blur -- Realistically render moving objects.
43274327
- Bounding volume hierarchies -- speeding up the rendering of complex scenes.
43284328
- Texture maps -- placing images on objects.
43294329
- Perlin noise -- a random noise generator very useful for many techniques.

books/RayTracingTheRestOfYourLife.html

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

7575
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
@@ -85,11 +85,11 @@
8585

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

9494

9595
Estimating Pi
@@ -3797,7 +3797,7 @@
37973797
world.add(make_shared<quad>(point3(213,554,227), vec3(130,0,0), vec3(0,0,105), light));
37983798

37993799

3800-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
3800+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
38013801
// Box
38023802
shared_ptr<hittable> box1 = box(point3(0,0,0), point3(165,330,165), white);
38033803
box1 = make_shared<rotate_y>(box1, 15);
@@ -3807,7 +3807,7 @@
38073807
// Glass Sphere
38083808
auto glass = make_shared<dielectric>(1.5);
38093809
world.add(make_shared<sphere>(point3(190,90,190), 90, glass));
3810-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
3810+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
38113811

38123812
// Light Sources
38133813
auto empty_material = shared_ptr<material>();

style/book.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ div.indented {
8888
min-width: 96%;
8989
width: fit-content;
9090
background: #e4e4e0;
91+
line-height: 1em;
9192
}
9293

9394
.md code {
@@ -241,6 +242,6 @@ div.credit-list ul {
241242
}
242243

243244
.md pre.listing.tilde code {
244-
font-size: 65%;
245+
font-size: 85%;
245246
}
246247
}

0 commit comments

Comments
 (0)