Proportions of ornamental gables in gothic architecture I'm trying to figure out mathematically precise proportions for gothic architecture-style gables.
The gable has the shape of a triangle. There is a central incircle, as well as a smaller incircle in the remaining space at the top. The legs of the triangle are tangent to two additional circles of the same radius as the smaller circle at the top, which are also tangent to the central incircle. If the base of the triangle is drawn so that it is tangent to the central incircle, then the two neighboring circles at the bottom are cut exactly in half.

I hope the image makes it more clear.
Now, my question is: for any given base or height of the triangle, or for any given radius of the central incircle, what is the radius of the smaller circles?
Since the legs of the triangle are tangent to 3 circles on either side, which also touch, and since the smaller circles are of the same size, I feel like there should be exactly one answer where the proportions exactly match.
I've tried a few things but my maths is a bit rusty and I can't seem to make a lot of progress. :/ I'd be grateful even for a suggestion from which direction to tackle this problem.


We have isosceles $\triangle ABC$ with $AB = AC$.  $O$ is the midpoint of $BC$, and angle $ t = \angle OAC $.  Further the height is $h = AO$
From this, it follows that
$OB = OC = h \ \tan t $
The semi-perimeter is given by
$ s = OB + AB = h ( \tan t + \sec t ) $
The radius of the incircle (shown in red) is
$ R = \dfrac{\text{Area}}{s}  = \dfrac{h \tan t }{\tan t + \sec t } $
Let $f = \dfrac{1 - \sin t }{1 + \sin t } $, then the radius of the small circle on top is $r$ which is given by
$ r = f R $
This is also the radius of each of the small circles on either side on the bottom.  Since their centers is on the base, then the distance of the center of the bottom right circle $G$ from the base midpoint $O$ is
$ d = h \tan t - r \sec t = h ( \tan t - f \dfrac{\tan t }{\tan t + \sec t } )$
Applying Pythagorean theorem to $\triangle ONB $
$ d^2 + R^2 = (R + r)^2 $
which simplifes to
$ d^2 = 2 R r + r^2 = (f^2 + 2 f ) R^2$
Substituting $d$ and $R$, and dividing by $h^2$ gives us
$ ( \tan t - f \dfrac{\tan t }{\tan t + \sec t } )^2 = (f^2 + 2 f) \dfrac{\tan^2 t }{(\tan t + \sec t )^2} $
Multiplying through by $ (\tan t + \sec t )^2 $, gives
$ ( \tan t (\tan t + \sec t ) - f \tan t )^2 = (f^2 + 2 f) \tan^2 t $
Dividing through by $\tan^2 t $, gives
$ ( \tan t + \sec t - f)^2 = f^2 + 2 f $
Substituting $f$ and multiplying through by $(1 + \sin t )^2 $, gives us
$ ( (\tan t  + \sec t) (1 + \sin t ) - (1 - \sin t )  )^2 = (1 - \sin t )^2 + 2 (1 - \sin t)(1 + \sin t) $
Multiplying through by $ \cos^2 t $, simplifies the above expression to,
$ ( (\sin t + 1)^2 - 1 + \sin t)^2 = (1 - \sin^2 t) ( 3 - 2 \sin t - \sin^2 t )$
Simplifying,
$ ( \sin^2 t + 3 \sin t)^2 = \sin^4 t + 2 \sin^3 t - 4 \sin^2 t - 2 \sin t + 3 $
And further,
$ \sin^4 t + 6 \sin^3 t + 9 \sin^2 t =\sin^4 t + 2 \sin^3 t - 4 \sin^2 t - 2 \sin t + 3 $
And finally,
$ 4 \sin^3 t + 13 \sin^2 t + 2 \sin t - 3 = 0 $
which is a cubic polynomial equation in $\sin t$.  Feeding this to wolframalpha.com gives only one valid solution which is
$ \sin t = \dfrac{\sqrt{17} - 1} { 8 } $
This is the golden trigonometric ratio for this problem.  It follows that
$t= \sin^{-1} \bigg(\dfrac{\sqrt{17} - 1} { 8 }\bigg) \approx 22.9786^\circ $
So, given $h$ we can now compute all the required radii using this value of $t$.
Finally, note the ratio
$\dfrac{r}{R} = f = \dfrac{1 - \sin t }{1 + \sin t } = \dfrac{ 9 -\sqrt{17} }{ \sqrt{17} + 7 } = \dfrac{ (9 - \sqrt{17})(7 - \sqrt{17}) }{49 - 17} \\= \dfrac{ 80 - 16 \sqrt{17} }{32} = \dfrac{5 - \sqrt{17}}{2} $
The inverse ratio is
$ \dfrac{R}{r} = \dfrac{2}{5 - \sqrt{17}} = \dfrac{ 2 (5 + \sqrt{17} ) }{ 8 } = \dfrac{5 + \sqrt{17}}{4} $
