# Radius of inner circles given radius of outer circle and number of inner circles in circular fractal

I am trying to create a circular fractal in which each circle is composed by a given number $n$ of smaller circles.

It would look something like this for $n = 8$:

However, I don't know how to calculate the radius of the smaller circles.

Of course I know that the distance from the centre of the bigger circle to the centres of the smaller circles is $r_1 - r_2$, where $r_1$ is the radius of the bigger circle and $r_2$ is the radius of the smaller ones, and that their radius is $\frac{d}{2}$ where $d$ is the distance between two adjacent circles' s centres.

$d$ is for sure related to $n$ but I don't know how to calculate it.

• Is $d$ the distance between small circle centers? Are inner circles touching? (In your diagram they are not). – Narasimham Jul 12 '16 at 8:41
• @Narasimham yes, it is, and yes, they should touch, thanks for asking. – user6245072 Jul 12 '16 at 8:42
• Are you trying to use an Iterated Function System to create something like this? – Mark McClure Jul 12 '16 at 11:25
• @Mark McClure yes, but I've removed the outline and added a circle of radius d - r2 in the centre, so it looks more like this. – user6245072 Jul 12 '16 at 11:50
• @user6245072 So, the resulting fractal loses the "just touching" effect that the initiator had. Not surprising, as the limit set for the IFS is independent of the seed. Perhaps, it would make sense to think in terms of a so-called polygasket, as in this answer? – Mark McClure Jul 12 '16 at 13:21

Consider the triangle formed by the centers of two adjacent small circles and by the center of the outer circle; if the inner circles touch, then one has: $$(r_1-r_2)\sin{\pi\over n}=r_2.$$ From that you can compute $r_2$: $$r_2=r_1{\sin(\pi/n)\over1+\sin(\pi/n)}.$$