TikZ — 圆锥和螺旋面的相交线,线太多

TikZ — 圆锥和螺旋面的相交线,线太多

这是我正在处理的图像:它是一条阿基米德螺线,显示为圆锥和螺旋面的相交线的正交投影。

\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
    \addplot3+[
        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});

    % Shadow
    \addplot3+[
        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
    \addplot3+[
        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
    \addplot3+[
        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
    \addplot3+[
        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}

输出如下所示:

圆锥与螺旋面的交点

现在我正在寻找添加螺旋面的方法。

问题是:输出图像中的线条太多,您几乎无法识别图像的单个部分(顺便说一下,它应该是黑白的)。

有什么想法可以解决这个问题吗?

答案1

如何将下面的行更改% Helicoid plane

\foreach \a in {0,2,...,48} {

为了使所有内容都变成黑白色,请将red下面最接近的更改% Intersection lineblack

结果是

在此处输入图片描述

相关内容