[Tex/LaTex] Draw a cylindrical spiral with TikZ

asymptotepgfplotstikz-pgf

I want to make a tikzpicture to illustrate the construction of a spiral capacitor.
These are made of spiral coiled films. So imagine a rectangular paper that you tail around one side. Thats basically how it looks like. Well I can programme this in MATLAB using cylindrical coordinates, then regrid to cathesian and then plot with pgfplots, but I think there must be a easier way. When I think of the possibilities of TikZ I think more about drawing a rectangle and tail it around a path I specified before. But sadly I found nothing about how to do that.

Anyone any idea?

Best Answer

You could use PGFPlots for this:

\documentclass[tikz,border=12pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
    colormap/outside/.style={
        colormap=
            {outside}{
            rgb255(0cm)=(235,235,235);
            rgb255(1cm)=(100,100,100);
            }
    },
    colormap/outside,
    colormap/inside/.style={
        colormap={inside}{
            rgb255(0cm)=(120,120,120);
            rgb255(1cm)=(255,255,255);
        }
    },
    colormap/inside
}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
    hide axis,
    axis equal image,
    z buffer=sort,
    view={30}{40},
    width=15cm
]
\addplot3 [
    surf,
    domain=0:3*360,
    samples=100,
    y domain=0:2000,
    samples y=2,
    line join=round,
    mesh/interior colormap name=inside,
    colormap/outside,
    shader=faceted,
    variable=\t,
    point meta={cos(t)},
    faceted color=black,
] ({cos(t)*1.1*t},{sin(t)*1.1*(t)},{y});
\end{axis}
\end{tikzpicture}
\end{document}