Skip to content

Commit b6981a4

Browse files
authored
Merge pull request #371 from RayTracing/sphere-equation-text
Sphere equation wording changes
2 parents 18d40eb + 594afa2 commit b6981a4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,12 @@
485485
<div class='together'>
486486
Let’s add a single object to our ray tracer. People often use spheres in ray tracers because
487487
calculating whether a ray hits a sphere is pretty straightforward. Recall that the equation for a
488-
sphere centered at the origin of radius $R$ is $x^2 + y^2 + z^2 = R^2$. The way you can read that
489-
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
490-
otherwise it is not”. It gets uglier if the sphere center is at
491-
$(\mathbf{c}_x, \mathbf{c}_y, \mathbf{c}_z)$:
488+
sphere centered at the origin of radius $R$ is $x^2 + y^2 + z^2 = R^2$. Put another way, if a given
489+
point $(x,y,z)$ is on the sphere, then $x^2 + y^2 + z^2 = R^2$. If the given point $(x,y,z)$ is
490+
_inside_ the sphere, then $x^2 + y^2 + z^2 < R^2$, and if a given point $(x,y,z)$ is _outside_ the
491+
sphere, then $x^2 + y^2 + z^2 > R^2$.
492+
493+
It gets uglier if the sphere center is at $(\mathbf{c}_x, \mathbf{c}_y, \mathbf{c}_z)$:
492494

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

0 commit comments

Comments
 (0)