I am trying to recreate a triangle spiral(red) with a foreach
-but the turn
option does not behave nicely - it seems to turn less and less each time. Is there an explanation? What am I doing wrong?
Here I use 90
degree angle and length 1
, just to illustrate:
\documentclass[tikz, border=1 cm]{standalone}
\begin{document}
\begin{tikzpicture}
\newcommand{\x}{0.872}
\draw[red] (0,0) -- (1,0)
-- ([turn]125:\x^1)
-- ([turn]125:\x^2)
-- ([turn]125:\x^3)
-- ([turn]125:\x^4)
-- ([turn]125:\x^5)
-- ([turn]125:\x^6)
-- ([turn]125:\x^7)
-- ([turn]125:\x^8)
-- ([turn]125:\x^9)
-- ([turn]125:\x^10);
\draw (0,0) -- (1,0) foreach \i in {1,...,50} {-- ([turn]90:1)};
\end{tikzpicture}
\end{document}
Edit:
With \draw (0,0) -- (1,0) foreach \i in {1,...,10} { -- ([turn]125:\x^\i)};
I get:
\draw (0,0) -- (1,0) foreach \i in {1,...,10} { -- ([turn]125:\x^\i)};
(but it does not)