0
$\begingroup$

... starts with a small circle in the center of the large circle.

enter image description here

The above picture shows a program I wrote to actually draw the circles out. But you can see that this method does not yield maximum number of blue circles. There are still spaces around the red circle.

The method i used is to draw blue circle "rings" starting from the center outwards. i.e move out in the blue arrow direction for one circle diameter, then go around in the red arrow direction, then repeat next ring in the blue arrow direction.

Anyone can share a smarter method? Thank you all. I need only to calculate the number, but if there is a systematic way to draw will be better.

  • 0
    There are some links at http://www.ics.uci.edu/~eppstein/junkyard/spherepack.html that may be useful.2011-11-03

2 Answers 2

0

I found a method to calculate the number of small cirles in the illustrated layout given a specific small circle and big circle diameter.

First, consider the layout as concentric layers of 6-sided polygon (hexagon) made up of small circles. Second, observe that the corners of the hexagon reaches the furthest extent of the circle, hence defining the limiting the big circle's radius.

Next, for each layer, the hexagon has 6 x n small circles in the nth layer. Hence total number of circles in N layers is 6 x summation(1 to n) and we add 1 more for the center circle.

Next is find the number of layers possible given a big circle, and that is simply diving the big radius by the small radium and find the qoutient.

3

If your goal is to make a program, then considering you already have that done, it seems like the easiest strategy would just be to: 1. Add on more rings until you know that every circle in a new ring will be outside the main circle. 2. Iterate through the small circles, removing all of the circles who's centers are further than R-r from the main circle, where R and r are the radii of the large and small circles respectively.

That however assumes that you can't fit more circles in by translating your entire set of small circles to the side a bit more. If you want to make sure you have the maximum, you might have to do some more fudging.

  • 0
    I figured how the perpendicular distance from center to the side of hexagon and used your suggestion to cull the blue circles that extends outside of the red circumference. So the drawing works now! Thanks. But I still wonder if there is a direct formula to calcualate this.2011-11-03