You have a sphere centered at [1,2,3] with radius 3, and a ray from [10,10,10] in the direction [-1,-1,-1]. Write the implicit equation for the sphere, the parametric equation for the ray, and compute the t-value of the intersection points.
I know that the equation of a sphere centered at $(x_{0}, y_{0}, z_{0})$ and with radius $r$ is $(x - x_{0})^{2} + (y - y_{0})^{2} + (z - z_{0})^{2} = 0$.
The implicit equation of this sphere is $(x - 1)^{2} + (y - 2)^{2} + (z - 3)^{2} = 3^{2} = 9$.
I also know that the parametric equation for a ray starting at the point $P(x_{0}, y_{0}, z_{0})$ and headed in the direction of the vector $\mathbb{v} = (v_{x}, y_{y}, y_{z})$ is given by $$x = x_{0} + v_{x}t$$ $$y = y_{0} + v_{y}t$$ $$z = z_{0} + v_{z}t$$
The parametric equation for this ray is $$x = 10 + (-1)t$$ $$y = 10 + (-1)t$$ $$z = 10 + (-1)t$$
How do I compute the $t$-value of the intersection points?
From a comment from Martigan:
We know that for the ray, $x = y = z = 10 + (-1)t = 10 - t$.
The equation of the sphere is $$(x - 1)^{2} + (y - 2)^{2} + (z - 3)^{2} = 3^{2} = 9$$
Substitute the parametric coordinates for the ray into the equation of the sphere:
$\begin{align*} ((10 - t) - 1)^{2} + ((10 - t) - 2)^{2} + ((10 - t) - 3)^{2} &= 9 \\ (9 - t)^{2} + (8 - t)^{2} + (7 - t)^{2} &= 9 \\ (t^{2} - 18t + 81) + (t^{2} - 16t + 64) + (t^{2} - 14t + 49) &= 9 \\ 3t^{2} - 48t + 194 &= 9 \\ t &= \dfrac{1}{3}\left(24 \pm \sqrt{21}\right) \\ &= 6.4725\text{ and }9.5275 \end{align*}$