Example: Spiral cone

Published 2014-03-17 | Author: Gonzalo Medina

For drawing a spiral cone, we need to find an appropriate parametrization.

This code was written by Gonzalo Medina on TeX.SE.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Spiral cone

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\usetikzlibrary{decorations.markings}
\def\Point{36.9}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
    view       = {-25}{-25},
    axis lines = middle,
    zmax       = 60,
    height     = 8cm,
    xtick      = \empty,
    ytick      = \empty,
    ztick      = \empty
  ]
  \addplot3+ [
    ytick      = \empty,
    yticklabel = \empty,
    domain     = 0:14.7*pi,
    samples    = 400,
    samples y  = 0,
    mark       = none,
    thick,
    red,
  ]
  ( {x*sin(0.28*pi*deg(x))},{x*cos(0.28*pi*deg(x)},{x});
  \addplot3+ [
    mark options = {color=blue},
    mark         = *
  ] 
  coordinates {({\Point*sin(0.28*pi*deg(\Point))},
    {\Point*cos(0.28*pi*deg(\Point)}, {\Point})};
  \addplot3+ [
    domain    = 0:12*pi,
    samples   = 100,
    samples y = 0,
    mark      = none,
    dashed,
  ]  
  ( {\Point*sin(0.28*pi*deg(\Point))}, {\Point*cos(0.28*pi*deg(\Point)}, {x} );
  \addplot3[
    mark=none,
    dashed
  ]
  coordinates {(0,0,0) ({\Point*sin(0.28*pi*deg(\Point))},
    {\Point*cos(0.28*pi*deg(\Point)}, {0})};
  \draw[
    radius = 80,
    decoration = {
      markings,
      mark= at position 0.99 with {\arrow{latex}}
    },
    postaction=decorate
  ] 
  (axis cs:0,10,0) arc[start angle=80,end angle=14] (axis cs:14,0,0);
  \node at (axis cs:20,0,30) {$P$};
  \node at (axis cs:24,0,7) {$z$};
  \node [font=\footnotesize] at (axis cs:20,17,0) {$\varrho$};
  \node [font=\footnotesize] at (axis cs:6,15,0) {$\varphi$};
  \end{axis}
\end{tikzpicture}
\end{document}
\end{document}

Comments

Adding comments is currently not enabled.

There are currently 0 comments on this entry.

Features
Tags
Scientific and technical areas

Creative Commons License