[pstricks] order of commands

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Aug 10 08:53:38 CEST 2012


Am 09.08.2012 21:43, schrieb Jon Joseph:
> All: I have run into this problem before and I am wondering if there is a general rule I should be aware of.  In the code below I have indicated three locations where I am trying to draw a 3D line. Two work and one doesn't.  When I forget about this ordering issue it can take me along time to figure out the goof.  Advice please. Jon


> \begin{pspicture}[showgrid=true](-1,-1)(4,5)
> \psset{ viewpoint=50 -30 -15, lightsrc=50 -10 65, Decran=250}
>
> \psLineIIID[linecolor=black, linestyle=dashed](0,0,0)(0.519615, 0.3, 1.03923) %<-- Does work if \psLineIIID command is here
>
> \defFunction[algebraic]{patch1}(u,v){cos(u)*sin(v)}{sin(u)*sin(v)}{cos(v)}
> \defFunction[algebraic]{patch2}(u,v){1.2*cos(u)*sin(v)}{1.2*sin(u)*sin(v)}{1.2*cos(v)}
>
> %	\psLineIIID[linecolor=black](0,0,0)(0.519615, 0.3, 1.03923) %<---- Does NOT work if \psLineIIID command is here
> 	

It is a problem with the \defFunction not \psLineIIID.
There is a general rule that the \defFunction should be placed directly
before the \psSolid. There should be no other command between
\defFunction and \psSolid.

Herbert

> 	\psSolid[object=surfaceparametree,
> 		base= 0 pi 6 div pi 6 div pi 4 div,
> 		ngrid=25 25,
> 		grid=false,
> 		action=draw**,
> 		function=patch1]
> 		
> 	\psSolid[object=surfaceparametree,
> 		base= 0 pi 6 div pi 6 div pi 4 div,
> 		ngrid=25 25,
> 		grid=false,
> 		action=draw**,
> 		function=patch2]
> 	
> 	\psset{linestyle=dashed}
> 	\psLineIIID[linecolor=black](0,0,0)(0.734847, 0.424264, 0.848528)
> 	\psLineIIID[linecolor=black](0,0,0)(0.848528, 0., 0.848528)
> %	\psLineIIID[linecolor=black](0,0,0)(0.519615, 0.3, 1.03923)  %  <--- Does work if \psLineIIID command is here.
> 	\psLineIIID[linecolor=black](0,0,0)(0.6, 0., 1.03923)
> 	\psset{linestyle=solid}
> 	\axesIIID[arrowscale=1.5](1.2,1.2,1.2)
>
> 	
>   \end{pspicture}
>
>
> \end{document}
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
>




More information about the PSTricks mailing list