# Spiral on a truncated cone

I need to plot a spiral around an inverted truncated cone, starting and ending at the centre of both bases. Something like this:

I've searched and found a similar solution, but for cylinders only: Helix on a cylinder

I couldn't adapt it to my geometric shape in question, so any help would be appreciated.

The code for the cone only:

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{3d,calc}

\begin{document}

\begin{tikzpicture}

\draw (-1,0) arc (180:370:2cm and 1cm);
\draw (-1,0) arc (180:10:2cm and 1cm);
\draw (0,-3) arc (180:360:1cm and 0.5cm);
\draw[dashed] (0,-3) arc (180:0:1cm and 0.5cm);
\draw(0,-3)  -- (-0.97,-0.18);
\draw(2,-3)  -- (2.97,-0.18);

\shade[left color=blue!5!white,right color=blue!60!white,opacity=0.3] (-0.97,-0.18) arc (190:350:2 and 1) -- (2,-3) arc (360:180:1cm and 0.5cm) -- cycle;
\shade[left color=blue!5!white,right color=blue!60!white,opacity=0.3] (1,0) ellipse (2cm and 1cm);

\draw[dashed] (0.7,-3) arc (180:0:0.3cm and 0.15cm);
\draw[dashed] (0.7,-3) arc (180:360:0.3cm and 0.15cm);

\end{tikzpicture}

\end{document}


Dinis Nunes

EDIT:

Following Ignasi suggestion, I've added a spiral function, but my goal was making the line follow closely the wall of the cone.

Code:

\node[xshift=1cm,yshift=-3cm] (dummy) {};
\draw[densely dotted,scale=0.09,variable=\x,shift=(dummy)] plot[domain = 0:10*pi, samples = 400] ({\x*0.6*sin(0.3*pi*deg(\x))},{\x},{\x*0.6*cos(0.3*pi*deg(\x)});

• Welcome to TeX.SX! Nice problem! – egreg Sep 1 '15 at 14:36
• May be you can adapt cited answer with these equations mathworld.wolfram.com/ConicalSpiral.html – Ignasi Sep 1 '15 at 15:05
• I did try something like that, although the spiral does no fit the cone, and doesn't look very good either. – Dinis Nunes Sep 1 '15 at 15:29

Here's one possibility using pgfplots; the spiral is drawn first and used to draw the truncated code:

The code:

\documentclass[dvipsnames,border=5pt]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{calc}

\colorlet{myblue}{blue!30}

\def\Pointi{42.67}
\def\Pointii{12.6}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
view={-10}{-10},
axis lines=none,
zmax=60,
clip=false,
height=16cm,
width=15cm,
xtick=\empty,
ytick=\empty,
ztick=\empty
]
draw=none,
no marks,
domain=10.3:14.405*pi,
samples=400,
samples y=0,
]
({5*x*sin(0.20*pi*deg(x))},{5*x*cos(0.20*pi*deg(x)},{x});

\coordinate (br)
at ({5*\Pointii*sin(0.20*pi*deg(\Pointii))},{5*\Pointii*cos(0.20*pi*deg(\Pointii)},{\Pointii});
\coordinate (ur)
at ({5*\Pointi*sin(0.20*pi*deg(\Pointi))},{5*\Pointi*cos(0.20*pi*deg(\Pointi)},{\Pointi});

\coordinate (BR) at ( $(ur)!1.113!(br)$ );
\coordinate (UR) at ( $(br)!1.24!(ur)$ );

\path
(BR)
coordinate[midway] (BL);
\filldraw[ball color=MidnightBlue!20,fill opacity=0.7,draw=black]
(UR)
coordinate[midway] (UL);
\filldraw[ball color=MidnightBlue!20]
(UR) --
(BL) --
(UL)
\draw[dashed]
(BR)
\draw[dashed]
([xshift=-19pt]BR)