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
1111 - Fix: Synchronize copies of ` hittable_list.h ` , ` material.h ` , ` sphere.h `
1212
1313### In One Weekend
14+ - Change: Wrote brief explanation waving away negative t values in initial normal sphere
1415 - Fix: Catch cases where ` lambertian::scatter() ` yields degenerate scatter rays (#619 )
1516
1617### The Next Week
Original file line number Diff line number Diff line change 725725visualize the normals with a color map. A common trick used for visualizing normals (because it’s
726726easy and somewhat intuitive to assume $\mathbf{n}$ is a unit length vector -- so each
727727component 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}$:
731732
732733 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
733734 double hit_sphere(const point3& center, double radius, const ray& r) {
You can’t perform that action at this time.
0 commit comments