Decreasing rings of tangent circles. Solved geometrically/graphically but would like to solve with equation. Inspired by a geometry workshop analyzing the dome of the Lotfollah mosque in Ifsahan, I started constructing a digital version of the pattern. When following the ruler and compass construction technique in Illustrator, I was encountering some significant issues that I thought might be rounding errors (illustrator rounds at 4 decimals for measurements, 2 for degrees). After some trial and error, I was able to solve my problem using GeoGebra but cannot figure out the equations that support it. Ideally, I would like to set a radius and derive all the other needed measurements. For example, I can set a radius to 18 and set the number of sides to 32 and solve my initial measurements to divide the circle.
The initial pattern is a ring of 32 circles around the main radius. 8 more rings of circles are placed inside, each with 32 circles, tangent to all circles around them. I have gotten close constructing this on Illustrator, but switched to GeoGebra to get more accurate results.
Image of geometric solution; I would like to solve for segment EF, the radius of the new tangent circle.
Interactive geometric solution on GeoGebra
Photo of the Lotfollah Dome via Wikimedia Commons
In the image/worksheet, I set an initial radius AB, and then draw angle ABB' based on n number of divisions/sides of the polygon (180 / n).CB is a perpendicular line to AB', and makes one of the sides of a polygon. BC is the radius that divides the first circle into n parts. When angle ABC is bisected, it passes through circle BC at point E. When I draw a line that passes through BE, it makes point F, which is the radius of the next level of circles, and is the center of tangent circle EF. I'd love to figure out how to calculate EF, AF, angle FBC or anything else that could help.
I know I lack some proper terminology in this query which may be why I haven't found a solution yet through search. I would be happy to be directed to a similar question or given better ways to describe the problem to continue my search. Many thanks in advance!
 A: Here is the picture I have obtained

Fig. 1 : Mutually tangent "necklaces". The external necklace $N_1$ being tangent to the next necklace $N_2$ means that that $N_2$ is the image of $N_1$ by a combined operation of shrinking (homothety) and rotation. 
using the following short Matlab program (where $r$ is the shrinking ratio $\approx 0.8434$ if $n=32$) using complex representation :
    clear all; close all; hold on; axis equal off;
    set(gcf,'color','b'); % blue background
    n=32;
    v=exp(i*pi/n);w=v^2;s=sin(pi/n);c=cos(pi/n);
    cir=s*exp(i*2*pi*(0:0.001:1)); % prototype "pearl"
    N=[];
    for L=1:32 ; 
        N=[N,NaN,w^L+cir]; % external "necklace" (pearl centers on the unit circle)
    end;
    r=(c+s^2-sqrt((c+1)*(c+s^2-c^2)))/(c^2); % shrinking ratio
    for D=1:20; % in this case 20 necklaces
        plot(N,'y');N=r*v*N; % new necklace = old necklace submitted to a hom. + rot.
    end;

Now, I come to the calculation of $EF$ ; I will use the notations of your figure that I reproduce below for a better understanding :

Fig. 2 : Replication of the image given in the question.
We take $AB=1$. Let $n$ be the number of the external ring pattern ( "necklace").
 Let 
$$s:=BC=BE=\sin(\pi/n) \ \ \text{and} \ \ c:=AC=\cos(\pi/n).$$
The "Mickey" figure with the 3 "small" circles (one black + 2 orange) is the image by a (shrinking) homothety centered in $O$, followed by a rotation, of the other "Mickey figure" with 3 "big" circles (again 1 black and 2 orange).
Let $r<1$ be the shrinking ratio. It is essential to understand that 
$$EF = r BE = rs \ \ \text{and} \ \  AF=r.$$
Applying Pythagoras theorem in right triangle $BFC$, we get :
$$BC^2+CF^2=BF^2 \ \ \iff \ \ CF^2=(s+rs)^2-s^2 \ \ \iff \ \ CF=s \sqrt{2r+r^2}\tag{1}$$
Using (1), we can write relationship $AF+FC = AC$ under the form
$$r+s\sqrt{2r+r^2}=c \tag{2}$$ 
giving rise to a quadratic equation for $r$ which has two real roots
$$r=\dfrac{1}{c^2}\left(c+s^2\color{red}{\pm}\sqrt{(c+1)(c+s^2-c^2)}\right)\tag{3}$$
We will take the smallest one with a $\color{red}{-}$ sign.
(see line 9 in the program ; there are hopefully simpler looking forms). 
From (3), one deduces :
$$EF=rs.$$ 
Remark : Had we taken in (3) a $\color{red}{+}$ sign instead of the $\color{red}{-}$ sign, we would have obtained the same figure ; do you see why ?
