[Math] finding one circles radius so that it tangentially touches two other set circles

analytic geometrycirclesgeometry

I am designing a water fountain on google sketchup and have run into a problem. I am designing the contours of the stone in the fountain. I would attach a picture of the problem but i need 10 reputation points. There are 3 circles. I have given the known x and y coordinates (a,b) and radii (r) for the circles below. I want to find the smallest circle's radius such that it tangentially touches the two other circles. I also want it to have the smallest circle's x coordinate center mentioned below (a = 2.027134).

circle 1: (a= 2.027134, b= ?, r= ?)
circle 2: (a= 2.027134, b= 6.943200, r= 1.904068)
circle 3: (a= 7.467008, b= 6.943200, r= 6.321755)

I have tried descartes theorem, Appolonius wikipedia information, but have had no luck. Any help would be much appreciated.

Best Answer

Let $C_1$ be the center of the circle you want (where you only know its $x$-coordinate), $r_1$ be the radius of that circle, and $C_2$, $r_2$, $C_3$, and $r_3$ be the center and radius of the second and third circles. It appears that the circle you want will be internally tangent to each of the other circles, so the distance between $C_1$ and $C_2$ must be $r_2-r_1$ and the distance between $C_1$ and $C_3$ must be $r_3-r_1$. Solving the system generated by these two requirements gives: $$r_1=0.763622\quad\text{ and }\quad C_1=(2.027134,5.80275)$$ or $$r_1=0.763622\quad\text{ and }\quad C_1=(2.027134,8.08365)$$ (solved using Mathematica).

diagram


edit If the circle we're finding is externally tangent to the second circle and internally tangent to the third circle, then the distance between $C_1$ and $C_2$ must be $r_1+r_2$ and the distance between $C_1$ and $C_3$ must be $r_3-r_1$. Solving the system generated by these two requirements gives: $$r_1=0.410104\quad\text{ and }\quad C_1=(2.027134,4.62903)$$ or $$r_1=0.410104\quad\text{ and }\quad C_1=(2.027134,9.25737)$$ (solved using Mathematica).

diagram