How do I find a point on the surface of a sphere How do I find a point on a sphere knowing its radius and center point ?
I have a sphere:  $$x^2+(y-1)^2+(z+3)^2=16$$
Obviously its center point is $(0,1,-3)$ and its radius is $4$.
I am asked to find the minimum and maximum distance to point $(1,1,1)$
So nearest point would be the touch point with the surface, and farthest point would be the touchpoint + distance of diameter.
Can you help me solve this? 
 A: Translate the centre of the sphere  to the origin. Then $(1,1,1)$ is translated to $(1-0,1-1,1-(-3))$, that is, to $(1,0,4)$.
The line through the origin and $(1,0,4)$ has parametric equation $x=t$, $y=0$, $z=4t$. Substitute in $x^2+y^2+z^2=16$. That will give you the two intersection points, and the rest is easy.
Remark: This is an instance of the technique Transform, Solve, Transform Back. Except if we only want the distances, we do not have to transform back.
In fact, we do not even have to do algebra, unless we want the points. For by spherical symmetry the minimum and maximum distances depend only on the distance of $(1,0,4)$ from the origin. So we can use instead the point $(\sqrt{17},0,0)$ and then read off the answer.
A: The line has direction $(1,1,1)-(0,1,-3)=(1,0,4)$. So go from the center of the sphere 4 units in that direction, to get $(0,1,-3)+4/\sqrt{17}(1,0,4)=(4/\sqrt{17},1,-3+16/\sqrt{17})$.
A: The distance from a point on the sphere to the point $p = (1,1,1)$ is 
$$f(x,y,z) = \sqrt{(x-1)^2+(y-1)^2+(z-1)^2}$$
And your $x$, $y$, and $z$ values are subject to the constrain function
$$g(x,y,z)=x^2+(y-1)^2+(z+3)^2$$
where
$$g(x,y,z) = 16$$
With the above info, solving
$$\nabla{f} = \lambda \cdot \nabla g$$
for $x$, $y$, and $z$ should give you your solutions. $\nabla f$ is the gradient of $f$, and $\lambda$ is just a dummy variable to help solve the problem.
