Skip to content

Commit 517cd44

Browse files
committed
Sphere equation wording changes
Originally suggested by @dafhi
1 parent a91ef50 commit 517cd44

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,11 @@
483483
<div class='together'>
484484
Let’s add a single object to our ray tracer. People often use spheres in ray tracers because
485485
calculating whether a ray hits a sphere is pretty straightforward. Recall that the equation for a
486-
sphere centered at the origin of radius $R$ is $x^2 + y^2 + z^2 = R^2$. The way you can read that
487-
equation is “for any $(x, y, z)$, if $x^2 + y^2 + z^2 = R^2$ then $(x,y,z)$ is on the sphere, and
488-
otherwise it is not”. It gets uglier if the sphere center is at
489-
$(\mathbf{c}_x, \mathbf{c}_y, \mathbf{c}_z)$:
486+
sphere centered at the origin of radius $R$ is $x^2 + y^2 + z^2 = R^2$. Put another way, for
487+
$(x,y,z)$ _inside_ the sphere, $x^2 + y^2 + z^2 < R^2$, for points _outside_ the sphere, $x^2 + y^2
488+
+ z^2 > R^2$, and for points _on_ the sphere, $x^2 + y^2 + z^2 = R^2$.
489+
490+
It gets uglier if the sphere center is at $(\mathbf{c}_x, \mathbf{c}_y, \mathbf{c}_z)$:
490491

491492
$$ (x-\mathbf{c}_x)^2 + (y-\mathbf{c}_y)^2 + (z-\mathbf{c}_z)^2 = R^2 $$
492493
</div>

0 commit comments

Comments
 (0)