# TikZ — Intersection line of a cone and a helicoid, too many lines

Here is the image I'm working on: it's an archimedean spiral, shown as an orthogonal projection of an intersection line of a cone and a helicoid.

\documentclass[12pt, border=0.5mm]{standalone}
\usepackage{etex}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}[x=1mm, y=1mm, z=1mm]
\begin{axis}[
axis equal image,
view       = {22}{12},
axis lines = none,
xmax       = 50,
xmin       = -50,
ymax       = 50,
ymin       = -50,
zmax       = 100,
zmin       = 0,
xtick      = \empty,
ytick      = \empty,
ztick      = \empty
]

% Ground
ytick      = \empty,
yticklabel = \empty,
domain     = 0:12*pi,
samples    = 1000,
samples y  = 0,
mark       = none,
draw       = none,
fill       = black!10
]
({12*pi*sin(deg(x))}, {12*pi*cos(deg(x)}, {0});

ytick      = \empty,
yticklabel = \empty,
domain     = 0:12*pi,
samples    = 1000,
samples y  = 0,
mark       = none,
line width = 0.2mm,
line cap   = round,
black!40
]
({x*sin(0.1*pi*deg(x))}, {x*cos(0.1*pi*deg(x)}, {0});

% Intersection line
ytick      = \empty,
yticklabel = \empty,
domain     = 0:12*pi,
samples    = 1000,
samples y  = 0,
mark       = none,
line width = 0.2mm,
line cap   = round,
red
]
({x*sin(0.1*pi*deg(x))}, {x*cos(0.1*pi*deg(x)}, {x});

% Base of a cone
ytick      = \empty,
yticklabel = \empty,
domain     = 0:12*pi,
samples    = 1000,
samples y  = 0,
mark       = none,
line width = 0.1mm,
black
]
({12*pi*sin(deg(x))}, {12*pi*cos(deg(x)}, {12*pi});

% Helicoid outer line
ytick      = \empty,
yticklabel = \empty,
domain     = 0:12*pi,
samples    = 1000,
samples y  = 0,
mark       = none,
line cap   = round,
line width = 0.1mm,
black
]
({12*pi*sin(0.1*pi*deg(x))}, {12*pi*cos(0.1*pi*deg(x)}, {x});

% Helicoid plane
\foreach \a in {0,1,...,48} {
\edef\temp{\noexpand \draw[line width=0.05mm] ({(1/4)*\a*pi*sin(0.1*pi*deg(\a*pi/4))}, {(1/4)*\a*pi*cos(0.1*pi*deg(\a*pi/4)}, {\a*pi/4}) -- ({12*pi*sin(0.1*pi*deg(\a*pi/4))}, {12*pi*cos(0.1*pi*deg(\a*pi/4)}, {\a*pi/4});}
\temp
}

%Cone walls
\foreach \a in {0,1,...,13} {
\edef\temp{\noexpand\draw [line cap=round, line width=0.05mm] (0, 0, 0) -- ({12*pi*cos(deg(\a*pi/7))}, {12*pi*sin(deg(\a*pi/7))}, {12*pi});}
\temp
}
\end{axis}
\end{tikzpicture}
\end{document}


The output looks like this:

Now I'm looking for a way to add the helicoid.

The problem is: there are too many lines in the output image and you are hardly able to recognize the single parts of an image (it should be black and white by the way).

Any ideas how to solve this problem?

• Please can you complete your code so it compiles and clarify your question. What should it look like? Are there too many lines in the image you posted? Should the red line be black? Or do you have some other code which is the problem but which we don't have? – cfr Dec 18 '15 at 22:55
• @cfr Full source is there. – GeMir Dec 20 '15 at 20:55

How about changing the line below % Helicoid plane to
\foreach \a in {0,2,...,48} {

And for making everything black and white, change the nearest red below % Intersection line to black.