I am trying to figure out a way for drawing $4$ touching circles like this:
Would appreciate help of any kind.
I am trying to figure out a way for drawing $4$ touching circles like this:
Would appreciate help of any kind.
On
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:
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.
On
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...
On
Well, drawing the first three circles is easy : pick a point $O_1$ and a radius $k_1$, trace the first circle $C_1$, pick a point $O_2$ and pick radius $k_2$ to be the distance from $O_2$ to $O_1$ minus $k_1$ and trace $C_2$, pick a point $O_3$ and pick radius $k_3$ to be the distance from $O_3$ to $O_2$ minus $k_2$ and trace $C_3$.
The part that’s a litte more difficult is to find a $O_4$ and $k_4$ that “fits in” the first and third circles. For this one, pick a radius $k_4$ first. Be reasonable, too small, and the circle cannot possibly touch both the first and the third circles, too large and you won’t be able to trace the circle inside your sheet.
Now, trace a circle $\bar C_1$ centered in $O_1$ and of radius $k_1 + k_4$ and another circle circle $\bar C_3$ centered in $O_3$ and of radius $k_3 + k_4$. Where $\bar C_1$ and $\bar C_3$ meets, it is a point at distance $k_1 + k_4$ of $O_1$ and $k_3 + k_4$ of $O_3$. Therefore name this intersection point $O_4$ and trace the circle $C_4$ of radius $k_4$ [There should be two such intersections. If $k_4$ is about $k_2$, one such intersection should be near $O_2$, so pick the other one to have something more like your picture above]. Because $O_4$ has distance $k_1 + k_4$ from $O_1$, circle $C_4$ of radius $k_4$ will touch circle $C_1$ of radius $k_1$ at one point. Likewise $C_4$ will touch $C_3$ at one point.
On
You can actually do this starting with $A$, $B$, $C$, and $D$, and you still have a degree of freedom... but there's a restriction on the locations of these four points: they must form a cyclic quadrilateral. (I'm not sure why, but it works out that way - perhaps because the perpendicular sectors all meet or something).
Once we have the points in place, it's easy: make segments $a = AB$, $b = BC$, $c = CD$, $d = DA$, and their perpendicular bisectors $a'$ etc. place a point $E$ anywhere along $a'$ (and I do mean anywhere: if it's too close it will make other circles flip sides but tangency still holds!), draw a line $EB$ and get its intersection $F$ on $b'$, $FC$ intersects $c'$ at $G$, $GD$ intersects $d'$ at $H$. Then $E$, $F$, $G$, $H$ are the centers of four circles that meet at $A$, $B$, $C$, and $D$.
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$.
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.
Fig. 2a and 2b, resp. before and after applying homographical transformation $h$ (Matlab program below).
Matlab program for Fig. 2 :
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$$
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 :
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.
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)
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: