I'm trying to redraw this image (source) in TikZ.
Here is my code for a triangle with an arbitrary length of the base (just straight forward construction):
\begin{tikzpicture}[x=1mm, y=1mm]
% Base length
\def\l{40}
\draw[line width=0.1mm] (0, 0) -- (\l, 0) -- (0.5*\l, {0.5*\l*tan(72)}) -- cycle;
% y = tan(36)x
\draw[line width=0.1mm, domain=0:{0.25*(1+sqrt(5))*\l}] plot(\x, {tan(36)*\x});
% y = tan(144)x - tan(144)*\l
\draw[line width=0.1mm, domain={0.5*\l}:\l] plot(\x, {tan(144)*\x - tan(144)*\l});
% y = tan(252)x + (tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*(0.25*(1+sqrt(5))*\l)
\pgfmathsetmacro{\p}{((tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*(0.25*(1+sqrt(5))*\l) + tan(144)*\l)/(tan(144) - tan(252))}
\pgfmathsetmacro{\q}{0.25*(1+sqrt(5))*\l}
\draw[line width=0.1mm, domain={\p}:{\q}] plot(\x, {tan(252)*\x + tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*0.25*(1+sqrt(5))*\l});
% y = tan(36)*0.5*\l
\pgfmathsetmacro{\p}{(tan(36)*0.5*\l + tan(252)*0.25*(1+sqrt(5))*\l - tan(36)*0.25*(1+sqrt(5))*\l)/(tan(252))}
\draw[line width=0.1mm, domain={0.5*\l}:{\p}] plot(\x, {tan(36)*0.5*\l});
% y = tan(108)x + ((tan(144)*(tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*0.25*(1+sqrt(5))*\l + tan(144)*\l)/(tan(144) - tan(252)) - tan(144)*\l) - tan(108)*(tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*0.25*(1+sqrt(5))*\l + tan(144)*\l)/(tan(144) - tan(252)))
\pgfmathsetmacro{\m}{tan(108)}
\pgfmathsetmacro{\b}{((tan(144)*(tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*0.25*(1+sqrt(5))*\l + tan(144)*\l)/(tan(144) - tan(252)) - tan(144)*\l) - tan(108)*(tan(36)*0.25*(1+sqrt(5))*\l - tan(252)*0.25*(1+sqrt(5))*\l + tan(144)*\l)/(tan(144) - tan(252)))}
\pgfmathsetmacro{\p}{(tan(36)*0.5*\l - \b)/\m}
\pgfmathsetmacro{\q}{(-\b - tan(144)*\l)/(\m - tan(144))}
\draw[line width=0.1mm, domain={\p}:{\q}] plot(\x, {\m*\x + \b});
\end{tikzpicture}
"A bit" messy, but it works. So, the problem is to put the spiral with right parameters at the right place.
I've calculated the coordinates of an intersection point (the pole of the spiral) of two red lines in original image for base length 40 and shifted a rotated spiral:
\pgfmathsetmacro{\cx}{(-sqrt(0.5*(5+sqrt(5)))*20 - (1/3)*sqrt(5+2*sqrt(5))*40)/(((-1/3)*sqrt(5+2*sqrt(5)) - sqrt(0.5*(5+sqrt(5)))))}
\pgfmathsetmacro{\cy}{(-1/3)*sqrt(5+2*sqrt(5))*((-sqrt(0.5*(5+sqrt(5)))*20 - (1/3)*sqrt(5+2*sqrt(5))*40)/(((-1/3)*sqrt(5+2*sqrt(5)) - sqrt(0.5*(5+sqrt(5)))))) + (1/3)*sqrt(5+2*sqrt(5))*40}
\pgfmathsetmacro{\a}{(5/(3*pi))*ln((1+sqrt(5))/2)}
\begin{scope}[rotate around={-270:(\cx, \cy)}]
\draw[line cap=round, line width=0.2mm, domain=-3*pi:4*pi, variable=\t, samples=1000]
plot ({\cx + 2.04666*exp(\a*\t)*cos(deg(\t))},
{\cy - 2.04666*exp(\a*\t)*sin(deg(\t))});
\end{scope}
The output looks pretty well but the estimated parameter 2.04666 annoys me. Is there any way to calculate it? Is there any better way to place the right spiral at the right place?
A
be a complex number representing the point on the top andO
a complex number representing the center of the spiral. Then the number comes from|A-O|/exp(\a*arg(A-O))
. Since you can expressA=(0.5*\l, {0.5*\l*tan(72)})
andO=(\cx,\cy)
now you can express2.0466