# Is there a specific way to accurately fit circles inside a curved path in Adobe Illustrator?

How would I have these circles line up perfectly inside the larger circle? I can try by hand, but that gets me nowhere.

• Divide your circle up using a line rotated to a specific angle - depending on how many circles you want, then fit one circle in it and rotate it by the same angle around the same rotation axis. Feb 17 at 10:31

Here's one possible method.

1. Use the Polar Grid tool to make a circle with 10 radial divisions, and 0 concentric divisions

1. Draw a circle to fit approximately. Then zoom in, in outline view, and make small adjustments. You can use numerical adjustments to adjust the size of the circle. Obviously, a little trial and error is needed here to get the lines to touch the circle at tangents. Use smart guides to help you get it to intersect.

1. Copy this circle and move to the opposite side of the circle, using smart guides to get it to intersect

1. Select both these circles, group them, and do Object > Transform > Rotate

2. Set the angle to 36° (because 360/10=36), hit Copy. And hit Ctrl+D 3 times

We do not have a generally valid practical method to place circles so that an already drawn curve becomes the common tangent for all circles and the adjacent circles touch each other just in one point. CAD programs can make such composition by performing some complex, but invisible trial and error process if you give the tangencies as constraints. Using CAD software (and CAD plugins for Illustrator) is beyond the scope of this answer.

Circle is a special case. It's in practice possible to fill a circle in the asked way, but it needs some math. The radiuses of the small (=inside) circles and the radius of the outline circle must fulfill a trigonometric equation. The math (see Note) is elementary, but there's no need to do such calculations if you let Illustrator help. The next process utilizes smart guides and snapping so that you'll get the result with Illustrator's full accuracy - no need to zoom in and eyeball to draw the parts!

Image 1: Draw a regular polygon with the polygon tool. Only click the tool to open the dialog. Let the number of the corners be = the wanted number of the fill circles. The polygon comes out automatically so that the bottom side is horizontal. Illustrator's snapping will utilize it later. In this case the wanted number of small circles is = 7. Apply Object > Path > Add anchor points to generate the midpoint anchors to every line segment for easy drawing in later steps.

Image 2: Draw a circle which has diameter = side AB in image 1. You can draw it directly to its final place corner B if you hold Alt and Shift keys as you draw and have snap to points and smart guides ON.

Image 3: Make copies of the drawn circle and place one to each polygon corner. They snap if you drag with the white arrow the centerpoints. The small circles are now as wanted, but drawing the tangential outline circle can be tricky. It snaps easily in Illustrator if there's an even number of small circles, but I drew the tricky case: An odd number of small circles.

The case is tricky because Illustrator's own center for the 7-gon is the center of the bounding box. It's not the center of the right outline circle. Do this:

1. The crossing of the red lines is the right center for the outline circle. The lines are drawn between existing anchors with the line tool.

2. The outline circle snaps to the top anchor point of the uppermost circle if you draw it from the center by holding Alt+Shift.

If it happens that the outline circle is already drawn and cannot be changed you must draw one approximate version with the right number of small circles as described above and scale the composition so that the outline circle has the right diameter. The scaled version has Illustrator's full accuracy.

Note: The calculation formulas without proofs:

Rout = the radius of the tangential outline circle, assumed to be known

N = the number of the inside circles, assumed to be known

R = the radius of the inside circle placement N-gon, will be calculated

S = the radius of the inside circles, will be calculated

R = Rout/(1+sin(Pi/N))

S = R(sin(Pi/N))

The sine function assumes angles are given as radians. If you want to use degrees, change Pi/N to (180 degrees)/N.

If one wants to calculate the dimensions with these formulas and then to use a drawing program to draw the composition inside a predrawn outline circle (which cannot be moved nor scaled) he must find the symmetry center of the N-gon. For odd N polygons it must be done by drawing 2 lines between a corner and the midpoint of the opposite side like shown in image 4 above. For even N polygons the bounding box center is OK.