Skip to content

Commit ea3754c

Browse files
committed
Update book 1 from Nate's progression + changes
1 parent d3e5bf9 commit ea3754c

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
Graphics_ by Steve Marschner and Peter Shirley, or _Computer Graphics: Principles and Practice_
6767
by J.D. Foley and Andy Van Dam.
6868

69+
See the [project README][readme] file for information about this project, the repository on GitHub,
70+
directory structure, building & running, and how to make or reference corrections and contributions.
71+
6972
See [our Further Reading wiki page][wiki-further] for additional project related resources.
7073

7174
These books have been formatted to print well directly from your browser. We also include PDFs of
@@ -191,6 +194,8 @@
191194
build/inOneWeekend > image.ppm
192195
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193196

197+
Complete building and running instructions can be found in the [project README][readme].
198+
194199
Opening the output file (in `ToyViewer` on my Mac, but try it in your favorite image viewer and
195200
Google “ppm viewer” if your viewer doesn’t support it) shows this result:
196201

@@ -2868,7 +2873,7 @@
28682873
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28692874
[Listing [lambertian-initial]: <kbd>[material.h]</kbd> The new lambertian material class]
28702875

2871-
Note the third option that we could scatter with some fixed probability $p$ and have attenuation be
2876+
Note the third option: we could scatter with some fixed probability $p$ and have attenuation be
28722877
$\mathit{albedo}/p$. Your choice.
28732878

28742879
If you read the code above carefully, you'll notice a small chance of mischief. If the random unit
@@ -4066,10 +4071,8 @@
40664071
}
40674072

40684073
ray get_ray(int i, int j) const {
4069-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
40704074
// Construct a camera ray originating from the defocus disk and directed at a randomly
40714075
// sampled point around the pixel location i, j.
4072-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
40734076

40744077
auto offset = sample_square();
40754078
auto pixel_sample = pixel00_loc
@@ -4126,7 +4129,7 @@
41264129

41274130

41284131
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
4129-
cam.defocus_angle = 10;
4132+
cam.defocus_angle = 10.0;
41304133
cam.focus_dist = 3.4;
41314134
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
41324135

@@ -4376,6 +4379,7 @@
43764379

43774380
[discussions]: https://github.com/RayTracing/raytracing.github.io/discussions/
43784381
[gfx-codex]: https://graphicscodex.com/
4382+
[readme]: ../README.md
43794383
[releases]: https://github.com/RayTracing/raytracing.github.io/releases/
43804384
[repo]: https://github.com/RayTracing/raytracing.github.io/
43814385
[square-pixels]: https://www.researchgate.net/publication/244986797

books/RayTracingTheNextWeek.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
you want a weekend project. Order is not very important for the concepts presented in this book, and
3232
without BVH and Perlin texture you will still get a Cornell Box!
3333

34+
See the [project README][readme] file for information about this project, the repository on GitHub,
35+
directory structure, building & running, and how to make or reference corrections and contributions.
36+
3437
These books have been formatted to print well directly from your browser. We also include PDFs of
3538
each book [with each release][releases], in the "Assets" section.
3639

@@ -4378,6 +4381,7 @@
43784381
[Trevor David Black]: https://github.com/trevordblack
43794382

43804383
[stb_image]: https://github.com/nothings/stb
4384+
[readme]: ../README.md
43814385
[releases]: https://github.com/RayTracing/raytracing.github.io/releases/
43824386
[wiki-further]: https://github.com/RayTracing/raytracing.github.io/wiki/Further-Readings
43834387

books/RayTracingTheRestOfYourLife.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939

4040
I hope that you find the math as fascinating as I do.
4141

42+
See the [project README][readme] file for information about this project, the repository on GitHub,
43+
directory structure, building & running, and how to make or reference corrections and contributions.
44+
4245
As before, see [our Further Reading wiki page][wiki-further] for additional project related
4346
resources.
4447

@@ -3872,6 +3875,7 @@
38723875
[Steve Hollasch]: https://github.com/hollasch
38733876
[Trevor David Black]: https://github.com/trevordblack
38743877

3878+
[readme]: ../README.md
38753879
[releases]: https://github.com/RayTracing/raytracing.github.io/releases/
38763880
[wiki-further]: https://github.com/RayTracing/raytracing.github.io/wiki/Further-Readings
38773881

0 commit comments

Comments
 (0)