I have this:

\begin{axis}[hide axis, unit vector ratio=1 1 1, view={-30}{45}]
\addplot3 [surf, 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)});

But it doesn´t works. I don´t know the reason. I would like to obtain exactly one of these:

enter image description here

Additionally, I´d like to draw a simple Klein bottle (without grid or shadows), but in this case I´ve nothing... :(

enter image description here

Thanks for the support!!


A colored Moebius band (run with xelatex):


\define@key[psset]{pst-3dplot}{HueBegin}{% Between 0 and 1
\define@key[psset]{pst-3dplot}{HueEnd}{% Between 0 and 1
% Default values

\def\parametricPlotThreeD@iii{%   without arrows (quickplot)
   \psk@ThreeDplot@yPlotpoints {
     /Counter 0 def
     /t tMin def
     xyz \@nameuse{beginqp@\psplotstyle}
     /t t dt add def
     \psk@ThreeDplot@xPlotpoints\space 1 sub {
       /Counter Counter 1 add def
       1 Counter eq { moveto currentpoint /OldY ED /OldX ED }
       {\ifPst@HSB % Other points than the first one
        /PointY exch def
        /PointX exch def
        Counter \psk@ThreeDplot@xPlotpoints\space div
        \PstHSB@HueBegin\space sub mul
        \PstHSB@HueBegin\space add
        1 1 sethsbcolor
        OldX OldY PointX PointY lineto lineto
        PointX PointY moveto
    /OldX PointX def /OldY PointY def
      \else lineto \fi } ifelse
       /t t dt add def
     } repeat
     /t t dt sub def
     /u u du add def
   } repeat

\def\Radius{5 }
 t 2 div cos u mul \Radius add t cos mul
 t 2 div cos u mul \Radius add t sin mul
 t 2 div sin u mul }
 t 2 div cos \Radius add t cos mul
 t 2 div cos \Radius add t sin mul
 t 2 div sin }
 t 2 div cos \Radius add t cos mul
 t 2 div cos \Radius add t sin mul
 t 2 div sin }

enter image description here

| improve this answer | |

Your code works (IMHO).

\begin{tikzpicture}[declare function={moeb=3;phase=120;}]
\begin{axis}[hide axis, unit vector ratio=1 1 1, view={-30}{45}]
\addplot3 [surf, domain=0:360, y domain=-2:2,point
meta=rawy,shader=interp,samples=51,samples y=2] (   
 {(10+y*cos(moeb*x/2+phase)))*cos(x)}, {(10+y*cos(moeb*x/2+phase)))*sin(x)}, {y*sin(moeb*x/2+phase)});

enter image description here

You may change the plot by playing with moeb, phase and point meta.

| improve this answer | |

I am not trying to give an exact answer but point out that your comment that gridded and grey is not desirable so taking your code example as found on this site with a few adjustments putting back we get this which I guess is a reasonable renderingenter image description here That does help many people to understand the nature of a mobeius

But if you try to remove the grid and the color as you have done you will at best get a dot.

Equally there are many answers for bottles on this site that you can adapt by removing the features you don't want, but removing the grids make them less understandable.

Thus you could remove the lables from this one enter image description herehttps://tex.stackexchange.com/a/77643/170109

Making a labeled Klein bottle using TikZ or pgfplots? pgfplots in combination with gnuplot requires additional semicolon pgfplots exp(-pow(deg(x),2) on domain 0:2*pi

Note for those wondering where to get their hands on a party piece for serving wine look at the manufacturer of the largest in the world

enter image description here(http://www.kleinbottle.com/wine_bottle_klein_bottle.html)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.