|
66 | 66 | Graphics_ by Steve Marschner and Peter Shirley, or _Computer Graphics: Principles and Practice_
|
67 | 67 | by J.D. Foley and Andy Van Dam.
|
68 | 68 |
|
| 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 | + |
69 | 72 | See [our Further Reading wiki page][wiki-further] for additional project related resources.
|
70 | 73 |
|
71 | 74 | These books have been formatted to print well directly from your browser. We also include PDFs of
|
|
191 | 194 | build/inOneWeekend > image.ppm
|
192 | 195 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
193 | 196 |
|
| 197 | +Complete building and running instructions can be found in the [project README][readme]. |
| 198 | + |
194 | 199 | Opening the output file (in `ToyViewer` on my Mac, but try it in your favorite image viewer and
|
195 | 200 | Google “ppm viewer” if your viewer doesn’t support it) shows this result:
|
196 | 201 |
|
|
2868 | 2873 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2869 | 2874 | [Listing [lambertian-initial]: <kbd>[material.h]</kbd> The new lambertian material class]
|
2870 | 2875 |
|
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 |
2872 | 2877 | $\mathit{albedo}/p$. Your choice.
|
2873 | 2878 |
|
2874 | 2879 | If you read the code above carefully, you'll notice a small chance of mischief. If the random unit
|
|
4066 | 4071 | }
|
4067 | 4072 |
|
4068 | 4073 | ray get_ray(int i, int j) const {
|
4069 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight |
4070 | 4074 | // Construct a camera ray originating from the defocus disk and directed at a randomly
|
4071 | 4075 | // sampled point around the pixel location i, j.
|
4072 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ |
4073 | 4076 |
|
4074 | 4077 | auto offset = sample_square();
|
4075 | 4078 | auto pixel_sample = pixel00_loc
|
|
4126 | 4129 |
|
4127 | 4130 |
|
4128 | 4131 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
|
4129 |
| - cam.defocus_angle = 10; |
| 4132 | + cam.defocus_angle = 10.0; |
4130 | 4133 | cam.focus_dist = 3.4;
|
4131 | 4134 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
|
4132 | 4135 |
|
|
4376 | 4379 |
|
4377 | 4380 | [discussions]: https://github.com/RayTracing/raytracing.github.io/discussions/
|
4378 | 4381 | [gfx-codex]: https://graphicscodex.com/
|
| 4382 | +[readme]: ../README.md |
4379 | 4383 | [releases]: https://github.com/RayTracing/raytracing.github.io/releases/
|
4380 | 4384 | [repo]: https://github.com/RayTracing/raytracing.github.io/
|
4381 | 4385 | [square-pixels]: https://www.researchgate.net/publication/244986797
|
|
0 commit comments