[pstricks] Plotting a Mobius-strip with PStricks

Juergen Gilg gilg at acrotex.net
Thu Dec 18 16:39:26 CET 2008


... here a nice example from Manuel Luque:

*\documentclass*{minimal}
*\usepackage*[dvipsnames,svgnames]{pstricks}
*\usepackage*{pst-solides3d}
\begin{document}
*\pagestyle*{empty}


\begin{pspicture}(-6,-3)(6,3)
*\psset*{unit=1.5}
*\defFunction*{mobius}(u,v)
   {2 u v Cos mul add 2 v mul Cos mul}
   {2 u v Cos mul add 2 v mul Sin mul}
   {u v Sin mul}
/%\defFunction[algebraic]{mobius}(u,v)//
//%   {(2+u*cos(v))*cos(2*v)}//
//%   {(2+u*cos(v))*sin(2*v)}//
//%   {u*sin(v)}//
/*\psframe**[linecolor=green!50](-6,-3)(6,3)
*\psset*[pst-solides3d]{viewpoint=20 10 5,Decran=40,lightsrc=20 10 10}
*\psSolid*[object=parallelepiped,a=5,b=5,c=0.5](0,0,-0.5)
*\psSolid*[object=grille,base=-2.5 2.5 -2.5 2.5,ngrid=0.25,
   linewidth=0.5*\pslinewidth*](0,0,-0.25)
*\psSolid*[object=surfaceparametree,linewidth=0.75*\pslinewidth*,
   base=0.2 0.25 0 pi,linewidth=0.1,
   function=mobius,
   ngrid=.025]/%//
/*\psSolid*[object=surfaceparametree,linewidth=0.75*\pslinewidth*,
   base=-0.25 -0.2 0 pi,linewidth=0.1,
   function=mobius,
   ngrid=.025]/%//
/*\psSolid*[object=surfaceparametree,linewidth=0.5*\pslinewidth*,
   base=-0.25 0.25 0 pi,fillcolor=yellow!50,incolor=yellow!50,
   function=mobius,
   ngrid=.05]/%//
/*\psSolid*[object=parallelepiped,
   a=4.5,b=4.5,c=0.5,action=draw]
*\psset*{solidmemory}
*\psSolid*[object=plan,
   definition=normalpoint,
   args={2.5 0 0 [1 0 0 90]},
   action=none,name=monplan]
*\psProjection*[object=texte,
   fontsize=15,pos=cc,
   text={ruban de Möbius},
   plan=monplan](0,-.5)
*\psSolid*[object=plan,
   definition=normalpoint,
   args={0 2.5 0 [0 1 0 180]},
   action=none,name=monplan]
*\psProjection*[object=texte,
   fontsize=15,
   text={pst-solides3d},
   plan=monplan](0,-0.5)
*\psPoint*(2.25,0,0){X1}*\psPoint*(3.5,0,0){X2}
*\psPoint*(0,2.25,0){Y1}*\psPoint*(0,3.5,0){Y2}
*\psPoint*(0,0,0){Z1}*\psPoint*(0,0,1.5){Z2}
*\psline*{->}(X1)(X2)*\uput*[dl](X2){$x$}
*\psline*{->}(Y1)(Y2)*\uput*[dr](Y2){$y$}
*\psline*{->}(Z1)(Z2)*\uput*[r](Z2){$z$}
\end{pspicture}
\end{document}


Regards,

Juergen


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
           www.brueckenkurs-physik.de
           www.gilligan-online.de

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


More information about the PSTricks mailing list