File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Change Log -- Ray Tracing in One Weekend
11
11
- Fix: Synchronize copies of ` hittable_list.h ` , ` material.h ` , ` sphere.h `
12
12
13
13
### In One Weekend
14
+ - Change: Wrote brief explanation waving away negative t values in initial normal sphere
14
15
- Fix: Catch cases where ` lambertian::scatter() ` yields degenerate scatter rays (#619 )
15
16
16
17
### The Next Week
Original file line number Diff line number Diff line change 725
725
visualize the normals with a color map. A common trick used for visualizing normals (because it’s
726
726
easy and somewhat intuitive to assume $\mathbf{n}$ is a unit length vector -- so each
727
727
component is between -1 and 1) is to map each component to the interval from 0 to 1, and then map
728
- x/y/z to r/g/b. For the normal, we need the hit point, not just whether we hit or not. Let’s assume
729
- the closest hit point (smallest $t$). These changes in the code let us compute and visualize
730
- $\mathbf{n}$:
728
+ x/y/z to r/g/b. For the normal, we need the hit point, not just whether we hit or not. We only have
729
+ one sphere in the scene, and it's directly in front of the camera, so we won't worry about negative
730
+ values of $t$ yet. We'll just assume the closest hit point (smallest $t$). These changes in the code
731
+ let us compute and visualize $\mathbf{n}$:
731
732
732
733
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
733
734
double hit_sphere(const point3& center, double radius, const ray& r) {
You can’t perform that action at this time.
0 commit comments