Finding radii of three tangent circles given their centers

55 Views Asked by At

I'm interested in making a program that draws the [Apollonian gasket][1] fractal. For this, I need a way to find the radii of three mutually tangent Soddy circles given their centers, for example given circles $C_i$ with center $(x_i, y_i)$, I want to find their radii $r_i$. so that these circles are mutually tangent.

Thanks for your help.

1

There are 1 best solutions below

1
On BEST ANSWER

Hint : Let $p=r_A,q=r_B,r=r_C$ the resp radii you are looking for.

Let $a=BC,b=CA,c=AB.$

You just have to solve the following system of equations

$$\begin{cases}q+r&=&a\\p+r&=&b\\p+q&=&c\end{cases}.$$