How to draw $4$ touching circles

First solution : @Dan Uznanski's answer (below) mentionning a tangential quadrilateral (https://en.wikipedia.org/wiki/Tangential_quadrilateral) has triggered in me the very simple following solution (in fact fairly general): take four points $A_1,A_2,A_3,A_4$ on a given circle (C) and consider the tangent lines in these points to circle (C) : their intersection points give the looked for "tangential" quadrilateral (see Fig. 1) whose vertices will be the centers of the circles with evident radii ! For example if $O_1$ is the intersection point of the tangents in $A_1$ and $A_2$, then the first circle has center $O_1$ and radius $r_1=O_1A_1=O_1A_2$.

enter image description here

Fig. 1.


Second solution : Start from the trivial solution represented on Fig. 2a, considered in the complex (Argand) plane, i.e., with centers:

$$O_1=1+0i; \ \ O_2=0+1i; \ \ O_3=-1+0i;\ \ O_4=0-1i$$

and common radius $\frac{\sqrt{2}}{2}$.

Apply to this figure a homographical transform

$$Z=\dfrac{az+b}{cz+d},$$

known to preserve circles and circles' tangencies ; in this way, the "necklace" of Fig. 1a can be transformed into a wide variety of other "necklaces". An example is given on Fig. 1b with transformation $h(z):=1/(z-(0.03-0.07i))$. Caution : Some transformations can induce internal instead of external tangencies.

enter image description here

Fig. 2a and 2b, resp. before and after applying homographical transformation $h$ (Matlab program below).

Matlab program for Fig. 2 :

t=0:0.001:2*pi;r=sqrt(2)/2;A=[-2,2,-2,2];
h=@(z)(1./(z-0.05-0.11*i));
O1=1+0i;O2=0+1i;O3=-1+0i;O4=0-1i;
f=@(z)(plot(z+r*exp(i*t)));
g=@(z)(plot(h(z+r*exp(i*t))));
subplot(1,2,1);hold on;axis equal;axis(A);
f(O1);f(O2);f(O3);f(O4);
subplot(1,2,2);hold on;axis equal;axis(3*A);
g(O1);g(O2);g(O3);g(O4);

3rd solution : The method we are going to see now is reserved to the case where centers are fixed from the beginning. It is valid for any "pearl necklace" of $n$ circles. This more general setting will help to understand the nature of the degree of freedom we have in this case $n=4$, that Narasimhan has expressed with mechanical terms.

Let us show how one can obtain the radii $r_k$s of the different circles.

Compute distances $d_1=O_1O_2, d_2=O_2O_3, d_3=O_3O_4, d_4=O_4O_1.$

It suffices now to solve the following system

$$(S) \ \ \begin{cases}r_1&+&r_2&&&&&=&d_1\\ &&r_2&+&r_3&&&=&d_2\\ &&&&r_3&+&r_4&=&d_3\\ r_1&+&.&.&.&+&r_4&=&d_4\end{cases}$$

It happens that for this case, adding equations 1 and 3 and, besides, adding equations 2 and 4 give the same LHS, yielding the following constraint :

$$r_1+r_2+r_3+r_4=d_1+d_3=d_2+d_4$$

System (S) (which is rank-3) has solution(s) iff constraint $$d_1+d_3=d_2+d_4\tag{1}$$ is fulfilled.

We just rediscovered a classical result known as Pitot theorem (https://en.wikipedia.org/wiki/Pitot_theorem).

This is why it is not so easy to find this set of 4 circles...

How to find explicitly the solutions ? (with an "s" because there are an infinite number of them).

It suffices to suppress in (S) for example equation 4 in order to remove the redundancy. Choose arbitrarily $r_4$ (smallest enough !). One has now the following system of 3 equations with three unknowns :

$$\tag{2}\begin{cases}r_1&+&r_2&&&=&d_1\\ &&r_2&+&r_3&=&d_2\\ &&&&r_3&=&d_3-r_4\\\end{cases}$$

which amounts to the general solution :

$$\tag{3}\begin{cases}r_1&=&d_1 &-& d_2 &+& d_3 &-& r_4\\ r_2&=&&& d_2 &-& d_3 &+& r_4\\ r_3&=&&&&& d_3 &-& r_4\end{cases}$$

where $d_1, d_2, d_3, r_4$ are "arbitrary" positive numbers such that radii $r_1,r_2,r_3$ are $\geq 0$ ($d_4$ being given by (1)).

An example is given on Fig. 3.

enter image description here

Fig. 3 : Different solutions with the same centers $O_1(16,0), O_2(7,12), O_3(0,12), O_4(-5,0)$, and successive distances $d_1=O_1O_2=15,d_2=O_2O_3=7,d_3=O_3O_4=13, d_4=O_4O_1=21$. Using formulas (3), we can take $r_1= 13-k, r_2=2+k, r_3=5-k, r_4=8+k$ for a certain range of values of $k$. (see Matlab program below)

enter image description here

Fig. 3 : a case where the three first circles are fixed and the last one has a variable radius. Please note that the locus of centers $O_4$ is part of a hyperbola (see solution by @Matthew Daly).

Remarks : 1) Condition (1) to be fullfilled and the fact that there is an infinite number of solutions will occur if and only if we have a chain of $n$ circles with $n$ even. No such problem when $n$ is odd. For example, the system for 3 circles :

$$\tag{4}\begin{cases}r_1&+&r_2&&&=&d_1\\ &&r_2&+&r_3&=&d_2\\ r_1&+&&&r_3&=&d_3\\\end{cases}$$

has a unique solution, without constraint.

Please note the extreme similarity of (4) with (2) : indeed, it suffices to take a radius $0$ circle to have $3$ circles instead of $4$...

The Matlab program that has permitted to draw Fig. 2:

t=0:0.01:2*pi;
f=@(c,r,s)(plot(c+r*exp(i*t),'color',s)); % c = center, r=radius
c='kmbgycr';% colors black, magenta, blue...
for k=0:0.5:3
   p=2*k+1;
   f(16+0i,13-k,c(p));
   f(7+12i,2+k,c(p));
   f(0+12i,5-k,c(p));
   f(-5+0i,8+k,c(p));
end;

If you don't have any conditions other than four touching circles, I could imagine constructing it in GeoGebra (at least the way I imagine it working).

Construct circles $O_1$ and $O_3$ with radii $r_1$ and $r_3$. Now, the locus of centers of circles that would be tangent to both of them would be points that are $r_1-r_3$ units closer to $O_3$ than $O_1$. That locus is a hyperbola with foci at $O_1$ and $O_3$. Then choose any $O_2$ and $O_4$ on that curve and finish it up.


So, you can do this in GeoGebra without too much effort. Follow these steps:

  • Create two non-intersecting circles. Make one bigger than the other to start
  • Draw a line segment connecting the centers of the circles and draw points where that line intersects the two circles.
  • Construct the midpoint of the two circle intersection points
  • Construct a hyperbola. They ask you to click on two foci and then a point of the hyperbola. The foci are the two circle centers and the point on the hyperbola will be midpoint you constructed in the last step
  • Choose a point on the hyperbola. Make sure you are using the same branch as the one that goes through the midpoint of the line segment. (If the two original circles have different radii, it should be easy to make out.)
    • Draw a line segment from that point to either of the two original circle centers
    • Construct a circle whose center is the new point and lies on the intersection of the new line segment with the original circle.
    • Repeat the preceding three steps to make a fourth circle that doesn't intersect the third one
    • Hide all of your auxiliary elements and enjoy your four semi-kissing circles!

If you do this well enough, you can probably even drag the centers around to ajust the entire structure in real-time. I'll let you play with it.


If circles $k1 , k2 $ are fixed then positions of $k3, k4$ can be varied. There is no unique relative position that can be determined like in 3 circles "kiss precise" case.

This is because in the quadrilateral $O_1O_2O_3O_4$only four lengths are given when actually you need five, making it to move like a mechanism.

So if two adjacent circles are fixed then the remaining two would be wheeling up and down...