Distance between a plane and a point I understood that for finding a distance between a plane and a point we first find a vector between a point on a plane and the given point and then take the projection on the normal vector.
Is $D=\frac{|{Ax_0+By_0+Cz_0-D}|}{\sqrt{A^2+B^2+C^2}}$ is the same? as ${Ax_0+By_0+Cz_0-D}$ is not the dot product with $\frac{N}{|N|}$ it seems that we put the point into the equation of the plane (but the point does not have to be on the plane).
 A: $\newcommand{\dist}{\operatorname{dist}}$The distance between the plane $\pi:Ax+By+Cz+D=0$ and a point $p:(x_0,y_0,z_0)$ is given by
$$\dist(\pi,p)=\frac{|{Ax_0+By_0+Cz_0\color{red}{+}D}|}{\sqrt{A^2+B^2+C^2}}.$$
As you mention, you need to take a point $(x,y,z)$ from the plane and take the projection on the normal direction of the vector from that point to the given $(x_0,y_0,z_0)$ one, that is, of vector
$$\vec{u}=(x_0-x,y_0-y,z_0-z).$$
A normal unit vector is $\frac{\vec{n}}{|\vec{n}|}$, where $\vec{n}=(A,B,C)$. Then
$$\dist(\pi,p)=\left|\frac{\vec{n}}{|\vec{n}|}\cdot \vec{u}\right| = \frac{\left|A(x_0-x)+B(y_0-y)+C(z_0-z)\right|}{\sqrt{A^2+B^2+C^2}}.$$
Since $(x,y,z)$ is on the plane, it satisfies $Ax+By+Cz=-D$. Using that in the numerator:
$$\dist(\pi,p)= \frac{\left|Ax_0+By_0+Cz_0-(Ax+By+Cz)\right|}{\sqrt{A^2+B^2+C^2}}= \frac{\left|Ax_0+By_0+Cz_0+D\right|}{\sqrt{A^2+B^2+C^2}}.$$
A: Here is a much simpler answer
than my preceding one.
Let $C$ be the center of the sphere,
$r$ its radius,
and $P$ be the external point.
Let $D=C-P$
and 
$N =
\dfrac{D}{|D|}
$,
so $N$ is a unit vector
pointing from $C$ to $P$.
Then
$C+rD$
is the point on the sphere
where the line from $P$
to $C$ intersects the sphere.
A: I like to specify a plane
by a normal to the plane
$N$
and a point on the plane 
$P$.
Then $A$ is on the plane
if
$0
=(A-P)\cdot N$
or
$A\cdot N
=P\cdot N
$.
If $B$ is not in the plane,
then the line from $B$
normal to the plane is
$L(t)
=B+Nt
$.
This intersects the plane when
$0
=(B+Nt-P)\cdot N
=(B-P)\cdot N+Nt\cdot N
$
or
$t
=\dfrac{(P-B)\cdot N}{N \cdot N}
=\dfrac{(P-B)\cdot N}{|N|^2}
$.
If $|N| = 1$,
then $t$ is the distance to the plane
and
$t 
=(P-B)\cdot N
$.
