Equation of all the spheres tangent to two planes and passing through a point Find all the spheres which are tangent to the planes $3x + 2y - z = 0$ and $x - y + 3z = 5$ and passing
through $(3 , -4, 12)$.
How can we solve this without knowing the center or radius? I'm stucked here.
 A: The centers of spheres tangent to the two planes all lie on one of the two planes which bisect their dihedral angles. You can narrow this down to a single half-plane by seeing in which of the four regions of space bounded by the two given planes the point $P(3,-4,12)$ lies. The problem then reduces to finding all of the points on this half-plane that are equidistant from $P$ and the two tangent planes. This will give you a system of equations to solve for these sphere centers.  

For a somewhat different approach that doesn’t require solving simultaneous quadratic equations, let $T_1$ and $T_2$ be the two tangent planes. Assume that we’ve determined in which quarter of the space $P$ lies and that we’ve selected the appropriate dihedral bisector plane $B$. Choose an orthonormal coordinate system $(u,v,w)$ such that $B$ is the $u$-$v$ plane, the $u$-axis is $T_1\cap T_2$, and the coordinates of $P$ are $(0,P_v,P_w)$ with $P_v\gt0$, so that all of the sphere centers will also have $v\gt0$. The distance of a point $Q(u,v,0)$ from $T_1$ and $T_2$ is easily found to be $v\sin\frac\theta2$, where $\theta$ is the dihedral angle between $T_1$ and $T_2$. This is also the radius of the sphere with center $Q$ that is tangent to the two planes. The distance from $P$ to $Q$ is, of course, $\sqrt{u^2+(v-P_v)^2+P_w^2}$, and so the equation of the locus of centers of the tangent spheres that pass through $P$ is $$u^2+(v-P_v)^2+P_w^2=v^2\sin^2\frac\theta2$$ or $$u^2+v^2\cos^2\frac\theta2-2P_vv+(P_v^2+P_w^2)=0.$$ This is the equation of an axis-aligned ellipse in the $u$-$v$ plane centered at $C\left(0,{P_v\over\cos^2\theta/2}\right)$. Geometrically, this point is the result of projecting $P$ onto $T_1$ or $T_2$ and then from there to $B$, as illustrated below:

The semi-axis lengths $a$ and $b$ are easily computed from the above equation.  
The computation to find this ellipse in the original coordinate system is fairly straightforward. The origin $O$ of the $(u,v,w)$ coordinate system lies at the intersection of $T_1$, $T_2$ and the perpendicular plane to them which passes through $P$, so is the solution to a system of linear equations. $P_w$ is the distance from $P$ to the plane $B$, and $P_v$ can be found via the Pythagorean theorem. Unit vectors in the $u$- and $v$- directions can be computed as cross products of the normals of various planes. From these, we can find the center $C$ of the ellipse and finally generate its parametric form $C+a\cos t\,\mathbf u+b\sin t\,\mathbf v$.
A: Hint. Note that the distance between centre $(x_0,y_0,z_0)$ of a sphere and a tangent plane $ax+by+cz=d$ is the radius $R$ of the sphere. Hence the equation is  $$(x−x_0)^2+(y−y_0)^2+(z−z_0)^2=R^2=\frac{(ax_0+by_0+cz_0-d)^2}{a^2+b^2+c^2}.$$
Can you take it from here?
