Details:

The Apollonius Circle Problem dates to Greek antiquity, circa 250 Image. Given three circles in the plane, find or construct a circle tangent to all three. This was generalized by replacing some circles with straight lines. Viéte [Canon mathematicus seu Ad triangula cum adpendicibus, Lutetiae: Apud Ioannem Mettayer, Mathematicis typographum regium, sub signo D. Ioannis, regione Collegij Laodicensis, p. 1579] solved the problem using circle inversions before 1580. Two generations later, Descartes considered a special case in which all four circles are mutually tangent to each other (i.e. pairwise). In this paper, we consider the general case in two and three dimensions, and further generalizations with ellipsoids and lines. We believe, we are the first to explicitly find the polynomial equations for the parameters of the solution sphere in these generalized cases. Doing so is quite a challenge for the best computer algebra systems. We report later some comparative times using various computer algebra systems on some of these problems. We also consider conic tangency equations for general conics in two and three dimensions.
Apollonius problems are of interest in their own right. However, the motivation for this work came originally from medical research, specifically the problem of computing the medial axis of the space around a molecule: obtaining the position and radius of a sphere which touches four known spheres or ellipsoids.