I have a point m outside a sphere. The sphere center is o and r is the radius of sphere. Distance from point m to o is l. If we draw a line from m to any point on the surface of sphere, this line has a length. Minimum length is l - r and maximum length would be l + r. I want the equation for distance from m to any point on the surface of sphere.
Also how to draw the graph of this equation (all possible distances)?

This is what I was looking for: distance =
See plot here.