02-17-2010, 12:08 PM
Carrie, it looks to me that the image you presented could be made with an algorithm something like this:
Number of rings = 3.
Size scaling factor = 100 (just an arbitrary guess).
Create the large circle:
Large circle center = center of the drawing space.
Large circle radius = number of rings * size scaling factor.
Draw the circle.
For i = 1 to number of rings. For each ring:
Number of circles in this ring = 6 * (i-1), but never less than 1 circle in a ring.
Angle increment in this ring = 360 / number of circles in this ring.
Distance increment in this ring = size scaling factor / number of rings.
For each circle in this ring:
Center of the circle is determined as an offset from the center of the large circle.
Clockwise angle is next angle increment, starting with 0.
Center of the small circle is distance increment for this ring away from center of the large circle.
Draw the circle.
Continue until all circles are drawn in this ring.
Continue until all rings are drawn.
By setting a larger constant for the number of rings, you should get more inner circles.
Why not try putting this into code and play around with it? I think I'm on the right track for the 2D version. Once that works then it will need to be scaled up/extruded into placing spheres in 3D space rather than circles in 2D space. This will require a further loop inside each ring, so that the angle is a (azimuth, elevation) pair for each next sphere.
Number of rings = 3.
Size scaling factor = 100 (just an arbitrary guess).
Create the large circle:
Large circle center = center of the drawing space.
Large circle radius = number of rings * size scaling factor.
Draw the circle.
For i = 1 to number of rings. For each ring:
Number of circles in this ring = 6 * (i-1), but never less than 1 circle in a ring.
Angle increment in this ring = 360 / number of circles in this ring.
Distance increment in this ring = size scaling factor / number of rings.
For each circle in this ring:
Center of the circle is determined as an offset from the center of the large circle.
Clockwise angle is next angle increment, starting with 0.
Center of the small circle is distance increment for this ring away from center of the large circle.
Draw the circle.
Continue until all circles are drawn in this ring.
Continue until all rings are drawn.
By setting a larger constant for the number of rings, you should get more inner circles.
Why not try putting this into code and play around with it? I think I'm on the right track for the 2D version. Once that works then it will need to be scaled up/extruded into placing spheres in 3D space rather than circles in 2D space. This will require a further loop inside each ring, so that the angle is a (azimuth, elevation) pair for each next sphere.