Skip to content

Commit 05dc29e

Browse files
authored
Merge pull request #376 from RayTracing/fix-348
Remove extraneous sentence on ray expression
2 parents fb2072d + 0ec3586 commit 05dc29e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,19 @@
350350
Rays, a Simple Camera, and Background
351351
====================================================================================================
352352

353+
<div class='together'>
353354
The one thing that all ray tracers have is a ray class, and a computation of what color is seen
354355
along a ray. Let’s think of a ray as a function $\mathbf{p}(t) = \mathbf{a} + t \vec{\mathbf{b}}$.
355356
Here $\mathbf{p}$ is a 3D position along a line in 3D. $\mathbf{a}$ is the ray origin and
356357
$\vec{\mathbf{b}}$ is the ray direction. The ray parameter $t$ is a real number (`double` in the
357358
code). Plug in a different $t$ and $p(t)$ moves the point along the ray. Add in negative $t$ and you
358359
can go anywhere on the 3D line. For positive $t$, you get only the parts in front of $\mathbf{a}$,
359-
and this is what is often called a half-line or ray. The example $\mathbf{c} = p(2)$ is shown here:
360+
and this is what is often called a half-line or ray.
360361

361362
![Figure [lerp]: Linear interpolation](../images/fig.lerp.jpg)
362363

364+
</div>
365+
363366
<div class='together'>
364367
The function $p(t)$ in more verbose code form I call `ray::at(t)`:
365368

0 commit comments

Comments
 (0)