[pstricks] pst3d-solides: what can possibly be wrong with this code?

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Jul 28 15:36:12 CEST 2010


Am 28.07.2010 15:06, schrieb Zbigniew Nitecki:
> Following the directions on p. 107 of the pst3d-solides docs, the following code
> ##############################################################
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> \begin{document}
> \begin{center}
> 		\begin{pspicture}(-0.5,-3.5)(3,3.5)
> 			\defFunction{gFunct}(u,v){v cos u mul}{v sin u mul}{1 u dup mul sub sqrt}
> 			\psSolid[object=surfaceparametree,
> %				range=[0 0.9 0 360],
> 				base=0 0.9 0 360,
> 				function=gFunct,
> 				fillcolor=blue!10,
> 					]
> 		\end{pspicture}
> \end{center}
> \end{document}
> ##############################################################
> leads to a crash (see below).   What can be causing it?

the missing ngrid value, it is preset to 0 which leads to
division by zero when calculating the du/dv. This one
works:

\listfiles
\documentclass[11pt]{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{center}
\begin{pspicture}(-0.5,-3.5)(3,3.5)
  \defFunction{gFunct}(u,v){v cos u mul}{v sin u mul}{1 u dup mul sub sqrt}
  \psSolid[object=surfaceparametree,
	base=0 0.9 0 360,
	function=gFunct,
	fillcolor=blue!10,
        ngrid=20]
\end{pspicture}
\end{center}
\end{document}


Herbert


More information about the PSTricks mailing list