[pstricks] setting up pst-solides3d

zbigniew nitecki nitecki2972 at comcast.net
Sun Jan 4 20:51:47 CET 2009


I am trying for the first time to use pst-solides3d.  To this end, I  
copied what I thought was relevant from the posting of Dec 18 by  
Manuel Luque.  Here is my complete code (including \usepackage calls  
to things I often use:  the last three are my own macro packages):
*********************************************************************************************
\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}
			
		\psset[pst-solides3d]{viewpoint=20 10 5,Decran=40,lightsrc=20 10 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=.05]
	\end{pspicture}
\caption{Moebius Band}
\label{fig:Moebius}
\end{center}
\end{figure}



\end{document}
*******************************************************************************************************

When I run this on TeXShop using TeX and Ghostscript, I get the  
following error message:
*****************************************************************************************************

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
  ...

l.118 \psset{SphericalCoor=false}
*****************************************************************************************
What am I doing wrong?  (Clearly, I do have a \begin{document}, but  
somehow the program doesn't recognize it).


  


More information about the PSTricks mailing list