Skip to content

Commit 319ea9e

Browse files
committed
Book 2 correction & clarity edits
Resolves #657
1 parent 810932c commit 319ea9e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,9 +2168,9 @@
21682168

21692169
</div>
21702170

2171-
The output of the perlin interpretation can return negative values. These negative values will be
2172-
passed to the `sqrt()` function of our gamma function and get turned into `NaN`s. We will cast the
2173-
perlin output back to between 0 and 1.
2171+
The output of the Perlin interpolation function can return negative values. These negative values
2172+
will be passed to our `linear_to_gamma()` color function, which expects only positive inputs. To
2173+
mitigate this, we'll map the $[-1,+1]$ range of values to $[0,1]$.
21742174

21752175
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
21762176
class noise_texture : public texture {
@@ -3428,9 +3428,9 @@
34283428

34293429
![Figure [rot-z]: Rotation about the Z axis](../images/fig-2.09-rot-z.jpg)
34303430

3431-
This involves some basic trigonometry that uses formulas that I will not cover here. That gives you
3432-
the correct impression it’s a little involved, but it is straightforward, and you can find it in any
3433-
graphics text and in many lecture notes. The result for rotating counter-clockwise about z is:
3431+
This involves some basic trigonometry using formulas that I will not cover here. It’s a little
3432+
involved, but it is straightforward, and you can find it in any graphics text and in many lecture
3433+
notes. The result for rotating counter-clockwise about z is:
34343434

34353435
$$ x' = \cos(\theta) \cdot x - \sin(\theta) \cdot y $$
34363436
$$ y' = \sin(\theta) \cdot x + \cos(\theta) \cdot y $$

0 commit comments

Comments
 (0)