# [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 ...

Herbert

\documentclass{article}
\usepackage{pst-3dplot}
\makeatletter
\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
\psset[pst-3dplot]{HueBegin=0,HueEnd=1,HSB=false}
\psset{dimen=outer}
\def\parametricPlotThreeD at iii{%   without arrows (quickplot)
\psk at ThreeDplot@yPlotpoints {
/Counter 0 def
/t tMin def
xyz \@nameuse{beginqp@\psplotstyle}
\psk at ThreeDplot@xPlotpoints\space 1 sub {
xyz
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
1 1 sethsbcolor
OldX OldY PointX PointY lineto lineto
stroke
PointX PointY moveto
/OldX PointX def /OldY PointY def
\else lineto \fi } ifelse
} repeat
/t t dt sub def
} repeat
}%
\@nameuse{endqp@\psplotstyle}%
}
\makeatother

\begin{document}
\psset{Beta=20}
\begin{pspicture}(-4,-4)(4,4)
\parametricplotThreeD[plotstyle=line,xPlotpoints=100,
yPlotpoints=100,drawStyle=xyLines,HSB](0,365)(-1,1){
t 2 div sin u mul }
%\pstThreeDCoor[xMin=-1,yMin=-1,zMin=-1]
\parametricplotThreeD[plotstyle=line,xPlotpoints=100,yPlotpoints=1,
linecolor=red,linewidth=2pt](180,-180){