[Tex/LaTex] Complex function plot using TikZ or PGFPlots

plottikz-pgf

I need to plot some steps of this approximation https://mathoverflow.net/a/27127 but don't know how to start.

enter image description here

Best Answer

Fixed the exponent typo now it is behaving properly.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}
\draw[style=help lines] (-1.5,0) grid[step=1] (1.5,1.5);
\node[fill,circle,inner sep=0.5pt] (one) at (1,0) {};
\node[fill,circle,inner sep=0.5pt] (i) at (0,1) {};
\pgfmathsetmacro\myfactor{1cm/1pt} % Pff.. pt causes arithmetic overflow

\foreach \k in {1,...,100}{
\draw[opacity=1/\k] (1,0) let 
\p1=($(one)+([scale=pi/\k]i)$), 
\n1 = {veclen(\x1,\y1)/\myfactor},\n2 = {atan2(\y1,\x1)} 
in\foreach \l in {1,...,\k}{-- ($({\l*\n2}:{(\n1^\l)*1cm})$)};
}
\end{tikzpicture}
\end{document}

enter image description here