# Positioning three circles, all of them touching each other

There are three circles, all of them touching each other. The bottom two circles are laying on an imaginary floor, such that they touch the line g=-r as well.

Given are all three radii, r1 (A), r2 (B) and r3 (C). Assuming circle A has its center on (0/0), B has its center on (2 sqrt(r1 * r2), r2 - r1). I am now supposed to find the coordinates of C.

Is this a know problem and has an easy/straighforward solution? I can't seem to find a nice approach.

-
Since you know the radii $r_1$, $r_2$, and $r_3$ and the centers $A$ and $B$, the center $C(x_c,y_c)$ must be a distance $r_1+r_3$ from $A$ and a distance $r_2+r_3$ from $B$, which gives the two equations $$x_c^2+y_c^2=(r_1+r_3)^2$$ and $$(x_c-2\sqrt{r_1r_2})^2+(y_c-(r_2-r_1))^2=(r_2+r_3)^2$$ Solving the system for $(x_c,y_c)$ should give the two possible coordinate pairs for $C$ (one as you've pictured, the other "below" the first two circles).
@fjdumont: I'm sure it can be done with the Law of Cosines—since you know the three side lengths of the triangle shown, you can get the measure of the angle at $A$; knowing where $B$ is, you can get the angle between $\overline{AB}$ and the $x$-axis; using those two angles and the length $AC$, you can get the coordinates of $C$. –  Isaac Mar 18 '11 at 15:12