[pstricks] some questions on pst-solide3d

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Fri Jan 9 14:54:53 CET 2009

Thanks, that was very helpful.  Now I have a further question.
I managed to create a broader Moebius band.

Then I wanted to create a center circle on that band, so I added the  
definition of centercircle and then called it at the end of the file,  
modeling what I did on the examples on p. 77 of the (English)  
documentation for pst-solides3d.  I will quote the full code below.

I get an error message (undefined control sequence) which I don't  
understand.  What is wrong?

Also, I can't find any documentation for a linestyle (I have in mind  

Here is my code:
%!TEX TS-program =  latex

%\usepackage{amsmath, amssymb}
\usepackage[dvipsnames, svgnames]{pstricks}
\usepackage{pst-plot, pst-math, pst-3dplot}
\usepackage{pst-grad, pst-func, pst-text}


\title{Brief Article}
\author{The Author}

			{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}
			{2 t mul Cos 2 mul}
			{2 t mul Sin 2 mul}
		\psset[pst-solides3d]{viewpoint=20 10 5,Decran=40,lightsrc=10 20 10}
%		\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.5 0.5 0 pi, fillcolor=lightgray!30, incolor=white,
			range= 0 pi,

\caption{Moebius Band}

and here is the console output:
### This is /usr/texbin/simpdftex, Version 20070809
### /usr/texbin/latex pst-solides3dTest.tex
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
  %&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax,  
dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek,  
ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech,  
danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german,  
ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish,  
italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese,  
romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish,  
h, ukrainian, uppersorbian, welsh, loaded.
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
`PSTricks' v1.26  <2008/07/31> (tvz)
  v1.41, 2004/05/18 <tvz>)  v1.01, 2008/01/26))
`pst-math' v0.3 (Rev 1.0, 2004-06-15 22:29:36+02), C.Jorssen))
`PST-3d' v1.00, 2005/09/03 (tvz))
  v1.00, 2007/10/16) `pstricks-add' v3.08, 2008/08/06 (dr,hv))
  v1.41, 2004/05/18 <tvz>) `PST-3dplot' v1.80, 2008/02/08 (HV,DL)))
`pst-grad' v1.06, 2006/11/27 (tvz,dg,hv)))
`PST-func' v0.55, 2008/06/12 (hv)))
  v1.00, 2006/11/05(tvz,hv)))
`PSTSOLIDESIIID' v4.10, 2008/07/24)) (./pst-solides3dTest.aux)
! Undefined control sequence.
l.49 		\pstSolid
? r
OK, entering \nonstopmode...
! Illegal unit of measure (pt inserted).
<to be read again>
l.52 			l

Overfull \hbox (377.0022pt too wide) in paragraph at lines 56--57
[1] (./pst-solides3dTest.aux)

  *File List*
  article.cls    2005/09/16 v1.4f Standard LaTeX document class
   size11.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
pstricks.sty    2008/01/24 v0.37 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2008/07/31 v1.26 `PSTricks' (tvz)
   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-plot.sty    2004/07/15 package wrapper for pst-plot.tex
pst-plot.tex    2008/01/26 1.01 `pst-plot' (tvz)
pst-math.sty    2004/03/20 package wrapper for PSTricks pst-math.tex
pst-3dplot.sty    2006/02/07 package wrapper for pst-3dplot.tex (hv)
pst-3dplot.tex    2008/02/08 v1.80 `PST-3dplot' (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-grad.sty    2004/07/15 package wrapper for pst-grad.tex (hv)
pst-grad.tex    2006/11/27 1.06 `pst-grad' (tvz)
pst-func.sty    2008/03/21 package wrapper for pst-func.tex (hv)
pst-func.tex    2008/06/12 v0.55 `PST-func' (hv)
pst-text.sty    2006/01/01 package wrapper for pst-text.tex (hv)
pst-text.tex    2006/11/05 1.00 `pst-text' (tvz)
pstricks-add.sty    2007/09/03 v. 0.11 package wrapper for pstricks- 
add.tex (hv
pstricks-add.tex    2006/11/05 v1.00 `PSTricks-add' (hv)
pst-solides3d.sty    2007/10/12 package wrapper for pst-solides3d
pst-solides3d.tex    2008/07/24 v4.10 `PST-solides3D'

LaTeX Warning: Label(s) may have changed. Rerun to get cross- 
references right.

(see the transcript file for additional information)
Output written on pst-solides3dTest.dvi (1 page, 3880 bytes).
Transcript written on pst-solides3dTest.log.
### WARNING: TeX returned non zero exit status
### /usr/texbin/dvips -R -Poutline  -o /tmp/altpdflatex. 
12879-1231508695/pst-solides3dTest.ps pst-solides3dTest.dvi
This is dvips(k) 5.97 Copyright 2008 Radical Eye Software (www.radicaleye.com 
' TeX output 2009.01.09:0844' -> /tmp/altpdflatex.12879-1231508695/pst- 
### ps2pdf13 /tmp/altpdflatex.12879-1231508695/pst-solides3dTest.ps / 
### Copying/moving pdf file /tmp/altpdflatex.12879-1231508695/pst- 
solides3dTest.pdf to pst-solides3dTest.pdf
### Succesfully generated pst-solides3dTest.dvi and pst- 

...and here is the pdf output:

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966

On Jan 8, 2009, at 16:15, Juergen Gilg wrote:

> Dear Zbigniew,
>> 1. Where do the limits on the parameters u and v get set?  If I  
>> want the width of the band to
>> change, where do I modify the code?
> They are set within the base=
> Play around with the factors of the \defFunction macro -- this one  
> defines the function. This function then gets a UNIQUE name -- in  
> this case _mobius_ with the variables _u_ and _v_
> You can define some other functions in that way with whatever  
> variable you like: _s_ and _t_, _x_ and _y_ etc. with another name.
> Within the macro \psSolid, you declare:
> function=mobius, which calls back the defined function with its  
> declared variables.
> base = 0.2 0.25 0 pi then sets the range of the variables  
> (u[0.2;0.25],v[0;pi])
> This is helpful, that you not have to declare what variable names  
> you chose -- base does the job automatically.
> object=surfaceparametree, defines the kind of object that solides-3d  
> predefined -- a function in 2 variables in that case.
> ngrid=.025, sets the GRID of the surface -- sometimes need to be set  
> to .024 to avoid a division by zero...
>> 2. what does the !50 after the colors do?
> This gives 50 % if intensity to the named color
>> 3. What is the role of base=...?
> To setup the range of the u and v values.
> Hope that helps,
> Juergen
>> Zbigniew Nitecki
>> Department of Mathematics
>> Tufts University
>> Medford, MA 02155
>> telephones:
>> Office    (617)627-3843
>> Dept.    (617)627-3234
>> Dept. fax    (617)627-3966
>> http://www.tufts.edu/~znitecki/
>> _______________________________________________
>> 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
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090109/fe31de43/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pst-solides3dTest.pdf
Type: application/pdf
Size: 52708 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090109/fe31de43/attachment-0001.pdf 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090109/fe31de43/attachment-0003.html 

More information about the PSTricks mailing list