[Tex/LaTex] Vertical spiral: from old fashioned to tikz

asymptotediagramstikz-pgf

I'm trying to draw in tikz the following figure taken from an old book:enter image description here

I tryed with standard spiral as suggested in How to draw vertical spiral using TiKZ? but the result is not satisfactory. Can you help me to create a faithful tikz version of this figure. thanks a lot 😀

EDIT:

\begin{tikzpicture}
    \begin{axis} [
        view={0}{75},
        axis lines=none,
        ymin=-2,
        ymax=5,
        xmin=-2,
        xmax=2]
        \addplot3 [domain=3.1*pi:5.5*pi, samples = 50, samples y=0]
        ({.5*sin(deg(-x))}, {.3*cos(deg(-x))+1}, {8*x*x*x});
    \end{axis}
\end{tikzpicture}

\begin{tikzpicture}
    \begin{axis}[
        view={60}{30},
        axis lines=center,axis on top,
        xlabel=$x$,ylabel=$y$,zlabel=$z$,
        ticks=none,
        no marks,axis line style={draw=none}
        ]
        \addplot3+[no markers, variable=\t,domain=0:4*pi,
        mesh,samples= 50, black]
        ({sin(\t r)}, {cos(\t r)}, \t);
    \end{axis}
\end{tikzpicture}

Best Answer

I found this other approach quite appealing. It is a bit tricky to get the coil right, but if it is not too important where the spiral runs exactly, this may be a possible solution:

\documentclass[border=1mm, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}
% base
\draw (-4,-1) node[shift={(.5,.25)}] {$\alpha$} -- (-2,1) -- 
      (4,1) -- (2,-1) -- cycle;

% cylinder
\draw (0,0) ellipse (2cm and .5cm);
\draw (0,5) ellipse (2cm and .5cm);
\draw (-2,0) -- (-2,5) (2,0) -- (2,5);

% axes
\draw[dashed] (0,0) node[above left] {$0$} -- (0,5);
\draw[->] (0,5) -- (0,6) node[right] {$x^3 = a$};;
\draw[->] (0,0) -- (2.25,0) node[right] {$x^2$};
\draw[->] (0,0) -- (-.75,-.75) node[left] {$x^1$};

% spiral
\begin{scope}
\clip (-2,0) rectangle (2,5);
\draw[decoration={coil, aspect=.55, segment length=50mm, amplitude=20mm}, decorate] (0,7.5) -- (0,-2.5);
\end{scope}

\end{tikzpicture}

\end{document}

enter image description here


EDIT

I tried again, this time without using decorative coils but rather by drawing an approximation of the spiral using curved lines. It should actually be possible to draw an exact spiral this way, but I don't know the math behind it, so I leave it like this. I finally used the intersection and the calc libraries to compute the coordinates where the different lines intersect.

\documentclass[border=1mm, tikz]{standalone}
\usepackage{tikz}

\usetikzlibrary{intersections, calc}

\begin{document}

\begin{tikzpicture}[coord/.style={fill, circle, inner sep=1pt}]
% base
\draw (-4,-1) -- (-2,1) -- (4,1) -- (2,-1) -- cycle;

% cylinder
\draw[name path=cylinderbase] (-2,0) arc (180:360:2cm and .5cm);
\draw[dashed] (2,0) arc (0:180:2cm and .5cm);
\draw[name path=cylindertop] (0,5) ellipse (2cm and .5cm);
\draw (-2,0) -- (-2,5) (2,0) -- (2,5);

% axes
\draw[dashed] (0,0) node[coord, label=above left:$0$] (null) {} -- (0,5) node[coord] {};
\draw[->] (0,5) -- (0,6) node[right] {$x^3 = a$};
\draw[->] (0,0) -- (2.25,0) node[right] {$x^2$};
\draw[->] (0,0) -- (-.75,-.75) node[left] {$x^1$};

% spiral
\begin{scope}
\clip (-2,0) -- (-2,5) arc (180:360:2cm and .5cm) -- (2,0) arc (360:180:2cm and .5cm) -- cycle;
\draw[name path global=spiralstart] (2,5.175) to[controls=+(270:2) and +(270:.5)] (-2,3.175);
\draw[dashed] (-2,3.175) to[controls=+(90:.5) and +(90:2)] (2,1.175);
\draw[name path global=spiralend] (2,1.175) to[controls=+(270:2) and +(270:.5)] (-2,-.175);
\end{scope}

% nodes
\path[name path=temp1] (null) -- ++(4.5,-1);
\path[name intersections={of=temp1 and cylinderbase}];
\node[coord, label=below:$P_1$] (p1) at (intersection-1) {};

\path[name path=temp2] (p1) -- ++(0,5);
\path[name intersections={of=temp2 and spiralend}];
\node[coord, label=above left:$P$] (p) at (intersection-1) {};

\path[name intersections={of=temp2 and spiralstart}];
\node[coord, label=above:$\bar P$] (pbar) at (intersection-1) {};

\draw[dashed] (null) -- (p1);
\draw[dashed] (p1) -- (pbar);
\draw[dashed] (p) -- +($(null)-(p1)$) node[coord, label=above left:$P_2$] {};

% labels
\node at (-3.45,-.75) {$\alpha$};
\node at (-1,0) {$\gamma$};
\node at (.125,-.25) {$\varphi$};
\end{tikzpicture}

\end{document}

enter image description here