Question: How can one create a spiral of roots as shown in the diagram below:

![enter image description here](https://i.stack.imgur.com/HfRHi.png)

where one can use a command to draw more parts to the spiral. For example, a command like `\sqrtspiral{1}`, `\sqrtspiral{2}`, `\sqrtspiral{3}` would generate the image above. 

NOTE
----

I am inviting all solutions in TikZ, PSTricks, Asymptote and possibly MetaPost. So many ways to achieve the same diagram.

Answer: 
![enter image description here](https://i.stack.imgur.com/cSRdE.png)

![enter image description here](https://i.stack.imgur.com/xbur6.png)

It looks more natural to start with `\sqrt{1}`. This `Asymptote` `MWE`
uses a function `spiralOfRoots(n)` defined in the `asydef` environment:

```
% spiralsq.tex :
%
\documentclass[10pt,a4paper]{article}
\usepackage{lmodern}
\usepackage{subcaption}
\usepackage[inline]{asymptote}
\begin{asydef}
unitsize(2cm);
import fontsize;
defaultpen(fontsize(9pt));
pen linepen=deepblue+0.8bp;
pen labelpen=black;
pen markpen=gray+0.6bp;

void spiralOfRoots(int n){
  assert(n>0);
  real w=0.15;
  pair O=0E,a=E,b;
  pair p,q,r;
  for(int i=1;i<=n;++i){
    draw(O--a,linepen);
    label("$\sqrt{"+string(i)+"}$",O--a,O,labelpen,UnFill);
    b=a+dir(degrees(a)+90);
    draw(a--b,linepen);
    p= w*dir(b-a);
    r=-w*dir(a);
    q=p+r;
    draw(a+p--a+q--a+r,markpen);
    label("$1$",a--b,dir(degrees(a-b)+90),labelpen);
    a=b;
  }
  draw(O--a,linepen);
  label("$\sqrt{x}$",O--a,O,labelpen,UnFill);
}
\end{asydef}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
%
\begin{document}
%
\begin{figure}
\captionsetup[subfigure]{justification=centering}
\centering
\begin{subfigure}{0.3\textwidth}
\centering
\begin{asy}
spiralOfRoots(1);
\end{asy}
%
\caption{1}
\label{fig:1a}
\end{subfigure}
%
\begin{subfigure}{0.3\textwidth}
\centering
\begin{asy}
spiralOfRoots(2);
\end{asy}
%
\caption{2}
\label{fig:1b}
\end{subfigure}
%
\begin{subfigure}{0.3\textwidth}
\centering
\begin{asy}
spiralOfRoots(3);
\end{asy}
%
\caption{3}
\label{fig:1c}
\end{subfigure}
%
\caption{1,2,3}
\label{fig:1}
\end{figure}
%
\begin{figure}
\centering
\begin{asy}
unitsize(15mm);
spiralOfRoots(15);
\end{asy}
\caption{15}
\label{fig:2}
\end{figure}

\end{document}
%
% Process:
%
% pdflatex spiralsq.tex
% asy spiralsq-*.asy
% pdflatex spiralsq.tex

```
Finally I found the chance to try the `turtle` library. This is a rather simple prototype that should serve as a demo and starting point for further improvements. Long live **LOGO** :)

```
\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{calc,turtle}
\begin{document}
\begin{tikzpicture}
  \def\numOfTs{8}
  \def\dotRad{1pt}
  \def\angleMarkLen{4pt}
  \draw [turtle={home,rt,fd,lt,fd}] coordinate (p0)
  \foreach \i in {1,...,\numOfTs}
  {%
    [turtle={%
      lt={90-atan(sqrt(\i))},%
      fd=\angleMarkLen,lt,%
      fd=\angleMarkLen,lt,%
      fd=\angleMarkLen,lt,%
      fd=\angleMarkLen,lt,fd}] coordinate (p\i)%
  };
  \foreach[count=\j from 2] \i in {0,1,...,\numOfTs}
  {%
    \draw (0,0) -- node[fill=white]{\tiny$\sqrt{\j}$} (p\i);%
    \fill (p\i) circle (\dotRad);%
  }
  \fill (1,0) circle (\dotRad);
  \fill (0,0) circle (\dotRad);
\end{tikzpicture}
\end{document}

```

![enter image description here](https://i.stack.imgur.com/T7Bpc.png)