What the formula for the distance from a point to a sphere

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
khdani
Messages
53
Reaction score
0
i know this formula from a point to a plane
[tex] d=\frac{Ax_0+By_0+cz_0}{\sqrt{A^2+B^2+C^2}}[/tex]

and i know that i could take from its center.

but i am looking for a formula of the distance from a point to a sphere
??
 
Physics news on Phys.org
I'm not aware that there is such a formula, at least not one that is widely circulated. Assuming the point is outside the sphere, find the distance from the point to the center of the sphere, and then subtract the radius of the sphere.
 
If the point is inside the sphere, do the subtraction the other way around. Or, like you do with the distance between two points on a number line, do the subtraction either way and take the absolute value.