[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  
"dashed").

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

\listfiles
\documentclass[11pt]{article}
%\usepackage{amsmath, amssymb}
\usepackage[dvipsnames, svgnames]{pstricks}
\usepackage{pst-plot, pst-math, pst-3dplot}
\usepackage{pst-grad, pst-func, pst-text}
\usepackage{pstricks-add}
\usepackage{pst-solides3d}

%\usepackage{graphicsmacros}
%\usepackage{basicmacros}
%\usepackage{calculusmacros}

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

\begin{document}
\maketitle
\begin{figure}[htbp]
\begin{center}
	\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{centercircle}(t)
			{2 t mul Cos 2 mul}
			{2 t mul Sin 2 mul}
			{0}
			
		\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,
			function=mobius,
			ngrid=.05]
			
		\pstSolid[object=courbe,
			range= 0 pi,
			linewidth=0.75\pslinewidth,
			linecolor=blue,
			function=centercircle]
			

	\end{pspicture}
\caption{Moebius Band}
\label{fig:Moebius}
\end{center}
\end{figure}



\end{document}
******************************************************************************************
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
(./pst-solides3dTest.tex
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,  
ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/latex/ 
pstricks.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.26  <2008/07/31> (tvz)
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.con))
(/usr/local/texlive/2008/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2008/texmf/tex/latex/config/color.cfg)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/dvips.def)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/dvipsnam.def)
(/usr/local/texlive/2008/texmf-dist/tex/latex/xcolor/svgnam.def)))
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/latex/pst- 
plot.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pst-plot.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/multido/multido.tex
  v1.41, 2004/05/18 <tvz>)  v1.01, 2008/01/26))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-math/pst-math.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-math/pst-math.tex
`pst-math' v0.3 (Rev 1.0, 2004-06-15 22:29:36+02), C.Jorssen))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-3dplot/ 
pst-3dplot.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-3d/pst-3d.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/usr/local/texlive/2008/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/keyval.tex))))
`PST-3d' v1.00, 2005/09/03 (tvz))
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks-add/pstricks- 
add.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pst-node.tex
  v1.00, 2007/10/16) `pstricks-add' v3.08, 2008/08/06 (dr,hv))
(/usr/local/texlive/2008/texmf-dist/tex/generic/multido/multido.tex
  v1.41, 2004/05/18 <tvz>) `PST-3dplot' v1.80, 2008/02/08 (HV,DL)))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-grad/pst-grad.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-grad/pst-grad.tex
`pst-grad' v1.06, 2006/11/27 (tvz,dg,hv)))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-func/pst-func.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-func/pst-func.tex
`PST-func' v0.55, 2008/06/12 (hv)))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-text/pst-text.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-text/pst-text.tex
  v1.00, 2006/11/05(tvz,hv)))
(/usr/local/texlive/2008/texmf-dist/tex/latex/pstricks-add/pstricks- 
add.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks-add/pstricks- 
add.tex))
  (/usr/local/texlive/2008/texmf-dist/tex/latex/pst-solides3d/pst- 
solides3d.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-solides3d/pst- 
solides3d.tex
`PSTSOLIDESIIID' v4.10, 2008/07/24)) (./pst-solides3dTest.aux)
! Undefined control sequence.
l.49 		\pstSolid
                 [object=courbe,
? r
OK, entering \nonstopmode...
! Illegal unit of measure (pt inserted).
<to be read again>
                    l
l.52 			l
          inecolor=blue,

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- 
solides3dTest.ps
</usr/local/texlive/2008/texmf/dvips/base/tex.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pstricks/pstricks.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-algparser.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-dots.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-math/pst-math.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-node.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pstricks-add/pstricks-add.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-grad/pst-grad.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-func/pst-func.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-text/pst-text.pro>
</usr/local/texlive/2008/texmf-dist/dvips/pst-solides3d/solides.pro>
</usr/local/texlive/2008/texmf/dvips/base/texps.pro>
</usr/local/texlive/2008/texmf/dvips/base/special.pro>
</usr/local/texlive/2008/texmf/dvips/base/color.pro>.
</usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb>
</usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr12.pfb>
</usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb>[1]
### ps2pdf13 /tmp/altpdflatex.12879-1231508695/pst-solides3dTest.ps / 
tmp/altpdflatex.12879-1231508695/pst-solides3dTest.pdf
### Copying/moving pdf file /tmp/altpdflatex.12879-1231508695/pst- 
solides3dTest.pdf to pst-solides3dTest.pdf
### Succesfully generated pst-solides3dTest.dvi and pst- 
solides3dTest.pdf


*******************************************************************************************
...and here is the pdf output:

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/

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