# How can the centers of these 5 related circles be specified as a formula?

This is my first time posting in this forum, so please forgive me if my question is too involved or if I've posted it in the wrong area. I hope someone finds it interesting enough to try their hand at it.

Considering the image below, I am trying to work out a set of formulas that will specify either the radii or the center points for the five unknown single-colored circles. If I can determine either the radii or the center points for the particular five circles that I'll describe below, then I believe I can easily determine all of the remaining points of intersection in the drawing.

In case the picture doesn't show up inline, or if you want to open it in another window so you can see it while you read the rest of the problem, here are a few different links to it:

Regarding the drawing, the following facts are given:
1) All 4 corners of the bounding rectangle are 90 degrees.
2) The lower left corner is considered to be the origin (0,0).
3) The lower edge is 1 unit in length.
4) The Red quarter-circle has its center at (0,0) and a radius of 1.
5) The center of the Purple and Blue circles are on the Y axis.
6) The centers of the Orange and Yellow circles are on the vertical line defined by X=1.
7) All of the circles are tangent to one another wherever they appear to be so in the drawing. (This isn't a visual trick. They aren't 'just close'.)
8) Similarly, all of the straight lines shown are between centers of various circles and are either tangent or normal to the circles wherever they appear to be so. (Again, this isn't a trick question.)
9) The Green circle and the Blue and Yellow Half circles are all tangent to the top of the bounding rectangle, just as they appear to be.

Since the center and radius of the Red circle are both given, the problem consists of determining the center and/or radius of the remaining Orange, Yellow, Green, Blue and Purple circles (or partial circles).

The remaining straight lines and multi-colored circles are given as additional geometric hints, showing for example that the points of tangency for any three of the mutually tangent circles in question will always fall on a multi-colored circle whose center is at the intersection of the lines that bisect the angles formed by the centers of the respective circles. Now that's a lot of words for one sentence, so let me try to break it down and explain one case as an example. Consider the mutually tangent Purple, Green and Orange circles. The triangle drawn between their centers, intersects each of them at their respective points of tangency. The three lines that bisect the three corners of that triangle will necessarily intersect at a common point. That point of intersection is the center of the multi-colored Purple/Green/Orange circle that overlaps the original three. Furthermore, lines drawn from the center of this new circle to the three original points of tangency are also tangent to the original circles at the same points of tangency shared by each pair of original circles. Finally, the resulting triangles are necessarily all right triangles!

When all of the circles and arcs are removed from the drawing, what remains is a set of 35 right triangles that completely fill the outer rectangle. These triangles can be grouped by the color of the circle that originally generated them:

4 are Red (16 if it was repeated to form a full circle.)
7 are Orange (14 if it was repeated to form a full circle.)
6 are Purple (12 if it was repeated to form a full circle.)
10 are Green (10, and it is the only single colored full circle.)
4 are Yellow (8 if it was repeated to form a full circle.)
4 are Blue (8 if it was repeated to form a full circle.)

Another interesting point. The top of the Orange and Purple circles may initially appear to be at the same height. In fact, they are not. It turns out that they can't be the same if all of the other rules are met. They just happen to be close.

Actually, if the Blue, Green and Yellow circles were taken out of the picture and the rectangle shortened and the Purple and Orange circles resized slightly so that their tops were both at the same level, then the problem is very simple to solve for just those two circles. It's only when the three remaining circles are added to the top as I have shown that the problem gets just past the edge of my ability.

Although I don't want to expound on it here, I have actually build a spreadsheet that reflects nearly all of the mutual dependencies, but since the spreadsheet can't have circular references, it ultimately ends up with two different independent forks or branches of calculations and the only way I have been able to solve it is to set one cell equal to the difference between the final equations on each branch. This difference represents the cumulative error between the branches using the baseline estimated angles. I then have Excel apply successive approximation - using "What-if" - to adjust the approximated values until the error becomes as nearly zero as possible. This approach gets me close enough for the practical purpose of drawing it here, but it still leaves my original question unanswered. To reiterate: How can I derive a formula that exactly defines either the radii or the center points for each the five circles I've specified?

One final note, I suspect that this may end up requiring a calculus solution. If so, it's over my head (for now). I'll still appreciate any responses, but I'm hoping for a solution that I can follow using just geometry, trig and algebra. A compass and straight-edge solution, in the unlikely case that it's even possible, would be really cool, but probably wouldn't answer my real question.

Thanks for playing,
David

• Welcome to MSE sir! Can I say your question is extremely interesting? Good job! I don't have an answer as of yet, will try a while later when free (I've my exams going on..). Do expect solutions from someone or the other to follow, for this site has no lack of geniuses. Also, you've posted it to the right place indeed... Have fun on this community! – Kugelblitz Mar 13 '15 at 13:14
• added picture... – GEdgar Mar 13 '15 at 14:02
• It sounds like what you have done in Excel is a numeric-methods solution to the problem, with a considerable amount of manual effort included to overcome the lack of a general solver in Excel. I'd consider that a legitimate approach. I am interested to see if there is a more "clever" way to do it. – David K Mar 13 '15 at 14:03
• Without the blue, green, and yellow circles you don't have enough information for a solution. The purple could grow some and the orange shrink appropriately to keep the three circles tangent and the centers on the vertical lines. – Ross Millikan Mar 13 '15 at 14:22
• Thanks David K. As I mentioned above, the Excel approach got me close enough for most practical purposes, but it's off just a bit as can be seen in the picture. Note that the horizontal line between the Yellow and Orange circles isn't quite straight in the picture. Technically it should be at 90 degrees to the outer rectangle. So should the similar lines between Blue and Purple as well as between Purple and Red. The reason it's off in the drawing is because I couldn't get any closer with Excel, and I had to manually translate the Excel numbers into the drawing program too. – David Mar 13 '15 at 14:28

Let us denote the centers of the circles by capital letters $R$, $O$, $P$, $B$, $Y$, $G$ for each color circle (red, orange, purple, blue, yellow, green). Let their radii be $r_b$, etc. We immediately have $$P = (0,1+r_p)\\ B = (0,1+2r_p+r_b)\\ O = (1,\sqrt{(r_o+1)^2-1})\\ Y = O + (0,r_o+r_y)$$ We have 5 circle radii to solve for, and the green circle has 5 tangency constraints, so the green circle is what will provide all the constraints. Denote $G = (x_g, y_g)$, then the top tangent constraint gives $y_g = 1+2r_p+2r_b-r_g$, while the other 4 are: $$\left\lVert B-G \right\rVert^2 = (r_b+r_g)^2 \\ \left\lVert Y-G \right\rVert^2 = (r_y+r_g)^2 \\ \left\lVert P-G \right\rVert^2 = (r_p+r_g)^2 \\ \left\lVert O-G \right\rVert^2 = (r_o+r_g)^2$$ We can use the first constraint to remove $x_g$ as a variable, so $x_g = \sqrt{(r_b+r_g)^2 - (r_g-r_b)^2}$. Plugging all these into Mathematica gives a solution:

Plugging those numbers into the Inverse Symbolic Calculator doesn't turn up anything, so these values cannot be represented analytically in a simple way.

• @GEdgar and I got the same answer, and you got something different. Mathematics is not a democratic process, so it's possible that the minority view will prevail, but you might want to check your work. – bubba Mar 14 '15 at 1:47
• In the original picture, you can measure the orange radius and get around 0.59, much less than 0.75... – GEdgar Mar 14 '15 at 2:11
• Thanks your answer Victor. I'm interested in the process (the mathematical steps involved) at least as much as the final answer. It seems that all of the answers so far end up using Maple or Mathematica. That's fine except that I have never used either of them and don't have any idea how I would input the problem into them. Secondly, they are great for providing the answers, but I want to learn the math behind the process. I think one of them (Maple or Mathematica) says it has the ability to show the step-by-step resolution of the problem. Could anyone post that output for me? – David Apr 22 '15 at 18:12
• Victor, do you know who maintains the Inverse Symbolic Calculator that you mentioned? I can't find contact info on the site. – David Apr 22 '15 at 18:18
• Try the email given at the bottom of this page. – Victor Liu Apr 22 '15 at 19:49

I got this... I used Maple.

let $f$ be the solution of $Z^8+191 Z^7-840 Z^6+1366 Z^5-1051 Z^4+369 Z^3-22 Z^2-20 Z+4=0$
with $f \approx 0.490892451047172$.

The red circle has center $(0,0)$ and radius $1$.

The orange circle has center $(1,a)$ and radius $\alpha$.

The purple circle has center $(0,b)$ and radius $\beta$.

The green circle has center $(f,g)$ and radius $\gamma$.

The yellow circle has center $(1,d)$ and radius $\delta$.

The blue circle has center $(0,e)$ and radius $\varepsilon$.

The height of the rectangle is $q$.

Where: $$a = 306903/25262-(1939995/50524) f-(94131/50524) f^7-(9023371/25262) f^6+(66087285/50524) f^5-(80907405/50524) f^4+(2371909/2972) f^3-(5400341/50524) f^2, \\ \alpha = -(17359/50524) f^7-(97837/1486) f^6+(12493681/50524) f^5-(16113939/50524) f^4+(9194777/50524) f^3-(133611/2972) f^2+(43669/50524) f+47145/25262, \\ b = -(95955/50524) f^7-(9193297/25262) f^6+(17315480/12631) f^5-(44047963/25262) f^4+(45604955/50524) f^3-(3121053/25262) f^2-(570195/12631) f+175118/12631, \\ \beta = -(95955/50524) f^7-(9193297/25262) f^6+(17315480/12631) f^5-(44047963/25262) f^4+(45604955/50524) f^3-(3121053/25262) f^2-(570195/12631) f+162487/12631, \\ d = 600881/25262-(3585615/50524) f-(163321/50524) f^7-(7823764/12631) f^6+(117883589/50524) f^5-(75344439/25262) f^4+(79769519/50524) f^3-(3055781/12631) f^2, \\ \delta = -(51831/50524) f^7-(2480464/12631) f^6+(2311919/2972) f^5-(26833767/25262) f^4+(30252289/50524) f^3-(1137849/12631) f^2-(1689289/50524) f+246833/25262, \\ e = -(203531/50524) f^7-(19497525/25262) f^6+(73927513/25262) f^5-(2798149/743) f^4+(100615859/50524) f^3-(7314683/25262) f^2-(1229558/12631) f+380731/12631, \\ \varepsilon = -(11621/50524) f^7-(1110931/25262) f^6+(4665593/25262) f^5-(3520570/12631) f^4+(9405949/50524) f^3-(1072577/25262) f^2-(89168/12631) f+43126/12631, \\ f = f, \\ g = 355200/12631-(1118598/12631) f-(185877/50524) f^7-(35614453/50524) f^6+(67343345/25262) f^5-(86481049/25262) f^4+(91632781/50524) f^3-(13530889/50524) f^2, \\ \gamma = -(29275/50524) f^7-(5602459/50524) f^6+(11249761/25262) f^5-(15697157/25262) f^4+(18389027/50524) f^3-(3243631/50524) f^2-(200128/12631) f+68657/12631, \\ q = -(3164/743) f^7-(10304228/12631) f^6+(39296553/12631) f^5-(51089103/12631) f^4+(27505452/12631) f^3-(4193630/12631) f^2-(1318726/12631) f+423857/12631$$

Numerical cpproximation: $$a = 1.23612328564785656 , \\ \alpha = .589968817155102521 , \\ b = 1.42833663490934448 , \\ \beta = .428336634909344482 , \\ d = 2.04366799976829583 , \\ \delta = .217575876266115742 , \\ e = 2.05895853101811710 , \\ \varepsilon = .202285346566878577 , \\ f = .490892451047172274 , \\ g = 1.96342771792025417 , \\ \gamma = .297816186731686194 , \\ q = 2.26124391141829761$$

• equations solved symbolically: $\left\{ g=q-\gamma, \left( 1+\alpha \right) ^{2}={a}^{2}+1,\beta+1=b, d+\delta=q,e+\epsilon=q,{f}^{2}+ \left( e-g \right) ^{2}= \left( \gamma+\epsilon \right) ^{2},{f}^{2}+ \left( g-b \right) ^{2}= \left( \beta+{\gamma} \right) ^{2}, \left( 1-f \right) ^{2}+ \left( d-g \right) ^{2}= \left( \gamma+\delta \right) ^{2}, \left( 1-f \right) ^{2}+ \left( g-a \right) ^{2}= \left( \alpha+\gamma \right) ^{2},\left( b-a \right) ^{2}+1= \left( \alpha+\beta \right) ^{2},a+\alpha+ \delta=d,b+\beta+\epsilon=e \right\}$ – GEdgar Mar 14 '15 at 2:17

In general, what you have described is known as a geometric constraint-solving problem. These sorts of problems have been studied quite a bit over the last 20 years or so; a good survey of the available techniques is here.

Some problems can be solved by sequential ruler-and-compass constructions, but most can not. Generally, you express each given constraint as an equation involving circle centers, radii, and other unknowns, and then you have to solve the resulting system of equations simultaneously. The equations will be non-linear, so some clever algebra or numerical methods will be required. I'm not surprised that Excel didn't work too well.

The DIY approach is as follows: denote by $(x_i, y_i, r_i)$ the center and radius of the $i$-th circle, where the $i$ values are red=1, orange=2, purple=3, blue=4, yellow=5, green=6.

Then the things we know are:

1. Red: $x_1 = 0, y_1 = 0, r_1 = 1$
2. Orange: $x_2 = 1, x_2^2 + y_2^2 = (r_1 + r_2)^2$
3. Purple: $x_3 = 0, y_3 = r_1 + r_3, (x_3-x_2)^2 + (y_3-y_2)^2 = (r_2+r_3)^2$
4. Blue: $x_4 = 0, y_4 = r1+2r3+r4$
5. Yellow: $x_5=1, y_5 = y_2 + r_2 + r_5$
6. Green: $(x_6-x_5)^2 + (y_6-y_5)^2 = (r_5+r_6)^2, (x_6-x_4)^2 + (y_6-y_4)^2 = (r_4+r_6)^2, (x_6 - x_3)^2 + (y_6 - y_3)^2 = (r_3 + r_6)^2, (x_6 - x_2)^2 + (y_6 - y_2)^2 = (r_2 + r_6)^2$.

Then lastly, there are two equations that say that the tops of the blue, yellow, green circles are at the same height ($r_1 + 2r_3 + 2r_4$).

1. Green: $y_6 + r_6 = r_1 + 2r_3 + 2r_4$
2. Yellow: $y_5 + r_5 = r_1 + 2r_3 + 2r_4$

Now hand these equations to Mathematica or Maple, and solve for each $(x_i, y_i, r_i)$.

Mathematica's NSolve function returns 8 solutions, but only one of them is realistic:

x1 = 0,                   y1 = 0,                   r1 = 1.000000000000000,
x2 = 1.000000000000000,   y2 = 1.236123309773482,   r2 = 0.589968816349978,
x3 = 0,                   y3 = 1.42833661693032,    r3 = 0.4283366169303163,
x4 = 0,                   y4 = 2.05895857598599,    r4 = 0.202285342125356,
x5 = 1.000000000000000,   y5 = 2.04366802211740,    r5 = 0.217575895993943,
x6 = 0.4908924510471699,  y6 = 1.963427729400839,   r6 = 0.2978161887105067


Mathematica couldn't find a symbolic solution, so it's unlikely that one exists. Also, since numerical solving gave 8 solutions, this suggests that the solution ultimately involves finding the roots of a polynomial of degree 8, and there are no formulae for such roots, except under very special circumstances.

I plugged the above answers into a CAD system to check. Looks right to me, and it agrees with the answer from @GEdgar below.

• Thanks Bubba, I don't have access to any really decent CAD tools. Besides, I am more interested in understanding the process of deriving the formulas than I am in the final answers, although that's an important part of it too. – David Mar 13 '15 at 14:30
• What you're describing is what I more-or-less did in Excel. The problem, as you have rightly observed is that I end up with two simultaneous equations with common dependencies and I don't know how to solve that situation. Note that the condition disappears when I only have Red, Orange and Yellow. The problem that causes the simultaneous inter-dependencies is when I have all of the circles as shown. I think you'll see what I mean if you try to continue with the rest of the list you started. It gets out of control real quickly and the cross dependencies show up before you finish. – David Mar 13 '15 at 14:48
• Yes. You need a way to solve simultaneous equations. Mathematica or Maple or a similar tool (or maybe a pencil, if you have sufficient skill and patience). – bubba Mar 13 '15 at 14:52
• I think I have enough pencil and paper and patience. I'm just slightly short on the skill that you also noted I'll need. That's what I'm hoping to glean from this forum. Thanks again. – David Mar 13 '15 at 14:56
• Thanks for plugging it into Mathematica for me since I don't have access to it. Yes, you're right about $x_6$ being negative. Several others are obviously wrong too. For example, all of them will have a radius less than 1 and just looking at the picture, you can see that none of them will have a Y greater than 3. Any chance you mis-typed it into Mathematica? I didn't go through all of your formulas, but the first few easy ones look right as well as the last two. Green is the messy one. – David Mar 13 '15 at 16:31