[pstricks] Mobius strip using pst-solides3d...
Werner Grundlingh
wgrundlingh at gmail.com
Thu Jun 30 07:27:01 CEST 2011
I'm trying to duplicate Manuel Luque's Mobius strip by using his online example:
http://melusine.eu.org/lab/bpst/pst-solides3d/surfaces/mobius_01.pst
Even with this suggestion:
http://web.archiveorange.com/archive/v/RvB8uBUpxXaywkh4YYeU
to change ngrid=.025, my Ghostscript still does not produce the
output. LaTeX compiles it without problem, but Ghostscript outputs:
Error: /undefined in mobius
Any ideas?
\listfiles
\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}
*File List*
minimal.cls 2001/05/25 Standard LaTeX minimal class
pstricks.sty 2011/04/23 v0.50 LaTeX wrapper for `PSTricks' (RN,HV)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
pstricks.tex 2011/06/07 v2.21 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
pst-fp.tex 2011/06/07 v2.21 `PST-fp' (hv)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
svgnam.def 2007/01/21 v2.11 Predefined colors according to SVG 1.1 (UK)
pst-solides3d.sty 2009/07/25 package wrapper for pst-solides3d
pst-solides3d.tex 2010/09/22 v4.23 `PST-solides3D'
***********
More information about the PSTricks
mailing list