如何修改莫比乌斯带?

如何修改莫比乌斯带?

我修改了 Jakes 的一些莫比乌斯代码,制作了另一个莫比乌斯带。您能帮忙让它在整体外观上更像下面第二张照片吗? 在此处输入图片描述

在此处输入图片描述

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{%
    ,compat=1.12
    ,colormap={mygreen}{rgb255(0cm)=(0,0,0); rgb255(1cm)=(0,255,0)}
    }

\begin{document}

\begin{tikzpicture}[rotate=-70]
\begin{axis}[
    hide axis,
    view={-10}{70}
]
\addplot3 [
    surf, shader=faceted interp,
    point meta=x,
    colormap name=mygreen,
    samples=120,
    samples y=8,
    z buffer=sort,
    domain=0:360,
    y domain=-.5:.5
] (
    {(1+0.5*y*cos(x/2)))*cos(x)},
    {(1+0.5*y*cos(x/2)))*sin(x)},
    {0.5*y*sin(x/2)});

\end{axis}
\end{tikzpicture}

\end{document}

答案1

这样够好吗?

\documentclass[border=9,tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{%
    ,compat=1.12
    ,colormap={mygreen}{rgb255(0cm)=(255,255,255); rgb255(1cm)=(255,255,255)}
    }

\begin{document}

\begin{tikzpicture}
\begin{axis}[
    hide axis,
    unit vector ratio=1 1 1,
    view={-30}{45}
]
\addplot3 [
    surf, shader=faceted interp,
    point meta=x,
    colormap name=mygreen,
    samples=100,
    samples y=2,
    z buffer=sort,
    domain=0:360,
    y domain=-1:1
] (
    {(10+y*cos(3*x/2)))*cos(x)},
    {(10+y*cos(3*x/2)))*sin(x)},
    {y*sin(3*x/2)});

\end{axis}
\end{tikzpicture}

\end{document}

替换samples y=2samples y=3

相关内容