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.
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!

