[pstricks] hidden lines in pst-solides3d

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Sat Jan 10 20:04:34 CET 2009


I am continuing with my attempt to draw a normal vector field on the  
Moebius band.
With Juergen's help, I have generated both the band and the field  
(there are some minor problems with the field, which are irrelevant to  
my present question).  I would like the vector field arrows to obey  
hidden lines rules.  If I draw the field first and then the band, any  
part of the field that would normally appear in front of the band is  
overwritten by the band.  If I do it in the opposite order, then the  
whole field (including arrows that should be hidden by the band) shows  
up.  setting visibility=false doesn't seem  to do it.  So I tried to  
mimic the fusion of solids as in the documentation.  However, I get a  
strange reaction.  My code is
*******************************************************************
\begin{figure}[htbp]
\begin{center}
	\begin{pspicture}(-6,-3)(6,3)

		\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 15,Decran=40,lightsrc=10 20 10}
		
		\psSolid[object=courbe,
		range= 0 pi,
		linewidth=1.5\pslinewidth,
		linecolor=blue,
		function=centercircle,
		ngrid=1,r=0]


\codejps{
	/Band{
		\psSolid[object=surfaceparametree, linewidth=0.5\pslinewidth,
			base=-0.4 0.4 0 pi, fillcolor=lightgray!30, incolor=white,
			function=mobius,
			ngrid=.05]
			} def
			
	/Field{
		\multido{\rv=-0.35+0.35}{10}{%
		\psSolid[object=vecteur,
		linecolor=lightgray,
		args= \rv\space Sin \rv\space 2 mul Cos neg
		\rv\space Sin \rv\space 2 mul Sin neg
		\rv\space Cos
		](\rv\space 2 mul Cos 2 mul, \rv\space 2 mul Sin 2 mul, 0)
		}
		} def
	Band Field solidfuz
	drawsolid**}
	\end{pspicture}
\caption{Moebius Band}
\label{fig:Moebius}
\end{center}
\end{figure}

***************************************************************************
and the console gives the error message
***********************************************************
`PSTSOLIDESIIID' v4.10, 2008/07/24)) (./pst-solides3dTest.aux)
Runaway argument?
{ /Band{ \psSolid [object=surfaceparametree, linewidth=0.5\pslinewidth  
\ETC.
! Paragraph ended before \codejps was complete.
<to be read again>
                    \par
l.52

******************************************************
and the field and centercircle get drawn, but the band is not.

What is a correct procedure?

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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090110/8fcb15f3/attachment.html 


More information about the PSTricks mailing list