Fitting circles inside other circles

  • #1
1
2

Main Question or Discussion Point

I'm working on the following fun problem.
I have a circle of a given radius, R0. (Green circle in the image).
I want to be able to supply a radius of the first circle that is to fit into this large circle. Lets say R1 is 0.75 * R0.
Following this I find the best position of R2 (to maximise its radius), is on top of the smaller circle.
This is the largest circle that can fit inside the green circle without overlapping the red circle or going out of the green circle.

I can calculate its radius and position easily. I now want to place the next largest circles next to the white circle - there will be two of equal diameter, next to the white and touching the white and red and border of green. I do not know how to calculate their radius or position.

upload_2016-8-26_23-16-9.png


I've included the html to generate the above placement with R1=0.75 R0.
When R1 is altered the white circle automatically changes size.
In the image below the blue circles represent the next largest circles that can be fitted. I expect there should be an infinite series of circles getting smaller and smaller. I would like to be able to calculate their placement and radius, leaving only R1 (red circle) as a variable that can be altered and all the other circles should get rendered automatically.

upload_2016-8-26_23-23-19.png
 

Attachments

  • Like
Likes ConfigRouter2 and Charles Link

Answers and Replies

  • #2
34,446
10,558
You can set up equations for points on all those circles, your new circle is then given by the parameters where the intersection with all three circles is exactly one point. It is also the smallest circle that has common points with all three circles. Solving those equations can be messy.
 
  • #3
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
I have something that might simplify things a little. Given ## R_0, R_1, R_2 ##, let's find the location of a circle of radius ## R_3 ## that makes contact with ## R_1 ## and ## R_2 ## at one point. To make it simpler, put the origin at the center of ## R_1 ## and make the center of ## R_2 ## lie along the x-axis. Use the law of cosines to write ## (R_2+R_3)^2=(R_1+R_2)^2+(R_1+R_3)^2-2(R_1+R_2)(R_1+R_3)cos(\theta) ##. (We solve this for ## \theta ##.)The center of the circle of radius ## R_3 ## has location (x,y) coordinates ## ((R_1+R_3)cos(\theta),(R_1+R_3)sin(\theta)) ##. (Call this ## (h_3, k_3) ## ). It remains to find the ## R_3 ## so that this circle intersects the ## R_0 ## circle at only one point. I think this might have a simple solution: Given centers ## (h_0,k_0) ## and ## (h_3,k_3) ## , you need to solve ## (h_0-h_3)^2+(k_0-k_3)^2=(R_0-R_3)^2 ##. (You don't even need the (x-h)^2+(y-k)^2=r^2 forms for the circles.)That should give ## R_3 ## and we already have the location of the center ## (h_3,k_3) ## as a function of ## R_3 ##. (A diagram would help, but my "Powerpoint" skills are lacking. Hopefully you can follow how the law of cosines was set up for the triangle, etc.)..editing... I worked through the equations=I don't know that my algebra was flawless=I will need to check it, but the answer I got is ## R_3=(R_1 R_2)(R_1+R_2)/(R_1^2+R_1 R_2+R_2^2) ##. (Note: I edited this answer once because I missed the sign on the ## R_2^2 ## term in the denominator. I think it may now be correct.) @mfb I think I have a solution for ## R_3 ##. With a slight modification (this one assumes circles 1 and 2 lie on the diameter of ## R_0 ##), this method could be used to solve for any of the circles in the sequence.
 
Last edited:
  • #4
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
The formula I computed above ## R_3=(R_1 R_2)(R_1+R_2)/(R_1^2+R_1 R_2+R_2^2) ## appears to be correct, at least with a couple of quick checks. When ## R_1=R_2 ##, it gives ## R_3=(2/3)R_1 ##. When ## R_0=4, R_1=3, R_2=1 ## it gives ## R_3=12/13 ##. Perhaps someone could check this case with a good graphics package, but I do think it may be correct.
 
  • #5
Nidum
Science Advisor
Gold Member
2,990
848
circles in circles.jpg
 
  • Like
Likes Charles Link
  • #7
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
The only difference in doing subsequent circles is, instead of the center of the biggest circle being at ## (h_0,k_0) =(R_0-R_1,0) ##, as it was in post ## 3 ##, it will be at some rotated coordinate. (Rotation is always about the center of ## R_1 ## and it is an angle given by the ## \theta ## for the previous circle.) I do think the solution for subsequent circles will remain somewhat simple algebraically, how it was for ## R_3 ## in post 3 where it turned out to simply be a linear equation for ## R_3 ##... editing.. Some subsequent calculations yielded a ## sin(\theta) ## term along with the ## cos(\theta) ## term for this more general case. Thereby, a numerical answer for given ## R_0,R_1 ,R_2, ## and ## R_3 ## ... is readily obtained, but a general expression, such as that for ## R_3 ## above would be much more difficult to compute.
 
Last edited:
  • #8
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
The OP doesn't appear to have returned yet= @micromass This is an interesting one, and it actually has a somewhat simple closed form for ## R_3 ##. (see my post 3). Perhaps you will find it of interest.
 
  • #9
Nidum
Science Advisor
Gold Member
2,990
848
The locus of the centres of the small circles is also a circle ?
 
Last edited:
  • Like
Likes Charles Link
  • #10
Nidum
Science Advisor
Gold Member
2,990
848
circles in circles-03.jpg
 
Last edited:
  • Like
Likes Charles Link
  • #11
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
View attachment 105222 The locus of the centres of the small circles is also a circle ?
Quite an interesting observation. It looks like it has a good chance of being correct. The closed form of ## R_4 ## is proving to be a little difficult, but this could prove to a very good find if it is correct. I think the center would lie at ## (R_2/2,0) ## if it is the case. (Midpoint of ## (-R_1,0 ) ## and ## (R_1+R_2,0) ##.) Will need to check and see if ## (h_2,k_2) ## and ## (h_3,k_3) ## are equidistant from this point....editing...My algebra is not infallible, but it appears from preliminary calculations that the centers do not form a circle.
 
Last edited:
  • #13
22,097
3,283
Let ##1## and ##1## be the radii of the internal circles. Then ##2## is the radius of the external circle. The curvatures are thus ##1/2## and ##-1## and ##-1##. The curvature of the ##n+1##th circle is ##z_{n+1}## given by

[tex]z_{n+1} = z_n -\frac{1}{2} - \sqrt{2} \sqrt{ -z_n -1 }[/tex]

The general solution to this recurrence problem is

[tex]z_n = - \frac{1}{4}((\alpha - \sqrt{2}n)^2 + 4)[/tex]

We know that ##z_0 = -1## and thus ##\alpha=0##. We get

[tex]z_n = - \frac{n^2 + 2}{2}[/tex]

Thus the radius of the ##n##th circle is
[tex]R_n = \frac{2}{n^2 + 2}[/tex]

For the general solution, you can find for any three points a Möbius transformation sending them to 3 arbitrary distinct points. This Möbius transformation respects circles and tangency, so you can bring back any situation to the one I just covered.
 
  • Like
Likes mfb and Charles Link
  • #14
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
Let ##1## and ##1## be the radii of the internal circles. Then ##2## is the radius of the external circle. The curvatures are thus ##1/2## and ##-1## and ##-1##. The curvature of the ##n+1##th circle is ##z_{n+1}## given by

[tex]z_{n+1} = z_n -\frac{1}{2} - \sqrt{2} \sqrt{ -z_n -1 }[/tex]

The general solution to this recurrence problem is

[tex]z_n = - \frac{1}{4}((\alpha - \sqrt{2}n)^2 + 4)[/tex]

We know that ##z_0 = -1## and thus ##\alpha=0##. We get

[tex]z_n = - \frac{n^2 + 2}{2}[/tex]

Thus the radius of the ##n##th circle is
[tex]R_n = \frac{2}{n^2 + 2}[/tex]

For the general solution, you can find for any three points a Möbius transformation sending them to 3 arbitrary distinct points. This Möbius transformation respects circles and tangency, so you can bring back any situation to the one I just covered.
@micromass Thank you for your input. I'm still trying to figure it out in its entirety, but the case you showed for two equal circles of ## R=1 ## gives for n=1 that ##R_1=2/3 ## which is in agreement with what I called ## R_3 ## above for ## R_1=R_2=1 ##.
 
  • #16
22,097
3,283
Let the first circle be around ##(2,0)## with radius ##2##. Let the second circle be around ##(1,0)## with radius ##1##. Then circle ##n## is around

[tex]C_n = \frac{6}{n^2 + 2} + \frac{4n}{n^2 + 2} i[/tex]

It can be easily checked that these all lie on the curve with equation ##32x^2 - 96x + 36y^2 = 0##, which is thus not a circle (as was asked in post 9) but rather an ellipse.
 
  • Like
Likes mfb and Charles Link
  • #17
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
Let the first circle be around ##(2,0)## with radius ##2##. Let the second circle be around ##(1,0)## with radius ##1##. Then circle ##n## is around

[tex]C_n = \frac{6}{n^2 + 2} + \frac{4n}{n^2 + 2} i[/tex]

It can be easily checked that these all lie on the curve with equation ##32x^2 - 96x + 36y^2 = 0##, which is thus not a circle (as was asked in post 9) but rather an ellipse.
Thank you @micromass Looks to me to be kind of a general result that the points will form an ellipse. Still a very heads-up observation by @Nidum that the points made some kind of regular smooth curve.
 
  • #18
22,097
3,283
Let the first circle be around ##(2,0)## with radius ##2##. Let the second circle be around ##(1,0)## with radius ##1##. Then circle ##n## is around

[tex]C_n = \frac{6}{n^2 + 2} + \frac{4n}{n^2 + 2} i[/tex]

It can be easily checked that these all lie on the curve with equation ##32x^2 - 96x + 36y^2 = 0##, which is thus not a circle (as was asked in post 9) but rather an ellipse.
Very interesting though: the foci of the ellipse seem to be exactly the center of the big circle and the center of the small circle!
 
  • Like
Likes Charles Link and mfb
  • #20
Charles Link
Homework Helper
Insights Author
Gold Member
4,597
1,970
Let the first circle be around ##(2,0)## with radius ##2##. Let the second circle be around ##(1,0)## with radius ##1##. Then circle ##n## is around

[tex]C_n = \frac{6}{n^2 + 2} + \frac{4n}{n^2 + 2} i[/tex]

It can be easily checked that these all lie on the curve with equation ##32x^2 - 96x + 36y^2 = 0##, which is thus not a circle (as was asked in post 9) but rather an ellipse.
Thank you @micromass I worked through your parametric equations for location of the center (replacing "n" by t) and the result is the ellipse that you computed.
 
  • #21
jim mcnamara
Mentor
3,944
2,342
We have a good set of answers so let's say 'thanks' for the help. Thread closed.
 

Related Threads on Fitting circles inside other circles

  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
4
Views
4K
  • Last Post
Replies
20
Views
3K
  • Last Post
Replies
11
Views
2K
Replies
8
Views
27K
Replies
23
Views
2K
  • Last Post
Replies
4
Views
2K
Replies
6
Views
31K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
6
Views
3K
Top