tikz add tag
Anonymous 1123
[Golden triangle](https://en.wikipedia.org/wiki/Golden_triangle_(mathematics)) can be made in [*Mathematica*](https://mathematica.stackexchange.com/questions/239914/how-to-create-a-spiral-using-golden-triangles).

How to creat a Golden triangle in LaTeX?
Top Answer
Here is a loop that does something of that sort.
\begin{tikzpicture}[line cap=round,line join=round,
	pics/golden triangle/.style={code={
 \path[draw,pic actions] (-#1,0) -- (#1,0) -- (0,{#1*tan(72)}) -- cycle;
 \path[transform shape] (0,0) foreach \X in {0,...,\mydim}
 {[rotate=-108*\X+108] ++({-pow(\myratio,\X-1)},0)++(72:{pow(\myratio,\X)}) 
   coordinate (tmp-\X) 
   [rotate=-108] (tmp-\X)
 	pic[fill/.evaluated={{\mycolors}[\X]}]{golden triangle/.evaluated={pow(\myratio,\X)}}};	
![Screen Shot 2021-02-17 at 9.46.07 PM.png](/image?hash=4afa64cde05919d87f1455cbb336bb405754934acd17dfb9c2a6100feae6b851)
Answer #2
Jairo A. del Rio
Easy peasy with MetaPost and `gmp`. It requires `--shell-escape` enabled. 

**Edit:** Sorry, I missed the TikZ tag, but another approach won't harm anyone.
%% n: n of triangles
%% u: unit size
%% b: do we want a spiral? (T/F)
vardef goldentriangle(expr n, u, b) =
save base, nicespiral;
path base[], nicespiral;
%% Base triangle
base[0] := ( xpart dir 72, 0) -- (0, ypart dir 72) -- (-xpart dir 72, 0) -- cycle;
base[0] := base[0] scaled u;

%% More triangles
for i = 1 upto n:
	base[i] := point 0 of base[i-1] 
					rotatedaround (point 2 of base[i-1], 36) -- 
					point 2 of base[i-1] --
					point 0 of base[i-1] -- cycle;

%% Cute colors
for i = 0 upto n:
	fill base[i] 
	withcolor 1/n*((i-1) mod n, i mod n, (i+1) mod n);

%% Spiral, if requested
if b = true:
	draw point 1 of base[0]
	for i = 1 upto n: .. point 1 of base[i] endfor 
		withcolor (1,1/2,0);

%% Change the boolean if desired
draw goldentriangle(#1,\mpdim{#2},true);

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.