[pstricks] Möbius Strip

Herbert Voss Herbert.Voss at fu-berlin.de
Mon Nov 19 16:31:16 CET 2007

Hensh, Richard schrieb:
> Can one use PStricks to render a Möbius Strip? Has this been done?

here is another one, Idea is from Juergen and the HSB stuff
from Manuel ...


\define at key[psset]{pst-3dplot}{HueBegin}{% Between 0 and 1
   \def\PstHSB at HueBegin{#1}}
\define at key[psset]{pst-3dplot}{HueEnd}{% Between 0 and 1
   \def\PstHSB at HueEnd{#1}}
\define at boolkey[psset]{pst-3dplot}[Pst@]{HSB}[true]{}
% Default values
\def\parametricPlotThreeD at iii{%   without arrows (quickplot)
   \addto at pscode{%
     \psk at ThreeDplot@yPlotpoints {
       /Counter 0 def
       /t tMin def
       xyz \@nameuse{beginqp@\psplotstyle}
       /t t dt add def
       \psk at ThreeDplot@xPlotpoints\space 1 sub {
         /Counter Counter 1 add def
         1 Counter eq { moveto currentpoint /OldY ED /OldX ED }
         {\ifPst at HSB % Other points than the first one
          /PointY exch def
          /PointX exch def
          Counter \psk at ThreeDplot@xPlotpoints\space div
          \PstHSB at HueEnd\space
          \PstHSB at HueBegin\space sub mul
          \PstHSB at 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 }

More information about the PSTricks mailing list