[pstricks] Plotting a Mobius-strip with PStricks

Juergen Gilg gilg at acrotex.net
Thu Dec 18 16:36:38 CET 2008

Heloo Fosk,

you might try -- however i think some better results are possible with 
pst-solides3d -- see the documentation about surfaces in R^3:


\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 }
 t 2 div cos \Radius add t cos mul
 t 2 div cos \Radius add t sin mul
 t 2 div sin }



Fosk wrote:
> Good morning everybody. How can I draw a Mobius strip using PStricks? 
> I tried using pst-plot3d but i can't control the design of parametric 
> 2-manifold (i obviously know a global atlas) ...I found only the 
> function allowing to draw parametric curves in R3.
> Thanks a lot
> ------------------------------------------------------------------------
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks

 Jürgen Gilg
 Austr. 59
 70376 Stuttgart
 Tel       0711.59 27 88
 e-Mail    gilg at acrotex.net
 Websites  www.acrotex.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20081218/0bda0a14/attachment.html 

More information about the PSTricks mailing list