[pstricks] two related pst3d problems

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Thu Aug 19 17:48:44 CEST 2010


I am trying to draw two vertical planes (the xz and yz planes) together with their intersections with the surface z=4x^2+y^2.  I am encountering two problems which I don't understand.

Here is the full source code:
****************************************************************
		\begin{pspicture}(-3,-1.5)(3,5.5)
			\psset{unit=0.35}
			\psset{lightsrc=40 50 50, viewpoint=18 65 30 rtp2xyz}
			
			\psset{solidmemory}
			
			\psSolid[object=plan,
			definition=equation,
			args={[1 0 0 0] 90},
			base=-2 2 -0.5 4.5,
				fillcolor=blue!10,
				opacity=0,
			name=xplane,
			]
			\psset{plan=xplane}
			
			\defFunction[algebraic]{xcutfcn}(y){y*y}{}{}
			\psProjection[object=courbe,
				linecolor=blue,
				range=-2 2,
				resolution=720,
				function=xcutfcn, 
				name=xcut,
				action=none,
				]
				
			\psSolid[object=plan,
			definition=equation,
			args={[0 1 0 0]},
			base=-1 1 -0.5 4.5,
				fillcolor=red!10,
				opacity=0,
			name=yplane,
			]
			\psset{plan=yplane}
			
			\defFunction[algebraic]{ycutfcn}(x){4*x*x}{}{}
			\psProjection[object=courbe,
				linecolor=red,
				range=-1 1,
				resolution=720,
				function=ycutfcn, 
				name=ycut,
				action=none,
				]
				
			\psSolid[object=fusion,
				action=draw**,
				base=xplane yplane,
%				base=xplane,
%				base=yplane,
				]
		\composeSolid
		\end{pspicture}
******************************************************************************
Question 1:  Note that there are two "blocks" of code, one defining the xz plane (and its intersection with the paraboloid, in blue) and another defining the yz plane (and its intersection with the paraboloid.
When I comment out the yz-plane part (and use the base=xplane line in the fusion) I get a perfectly good picture of the xz-plane, with the curve, in blue;
but when instead I comment out the xz-plane part but not the yz-plane part (and modify the base in fusion appropriately) I get the yz-plane, but NOT the curve. 

 I don't understand the difference in the two behaviors.

Question 2:  When I DON'T comment EITHER block of code, and use the combined base (this is the version shown above), I get a crash with the error message
> Error: /typecheck in --length--
> Operand stack:
>    -0.0   0.0   0.0   0.0   -0.0   -1.0   -1.0   1.0   1.0   -1.0   n   0.0
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861   1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   0   --nostringval--   %repeat_continue   --nostringval--
> Dictionary stack:
>    --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:802/1012(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:185/200(L)--   --dict:802/1012(L)--   --dict:2/11(L)--   --dict:4/5(L)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 412796
> GPL Ghostscript 8.70: Unrecoverable error, exit code 1
> ### FAILED to generate /tmp/altpdflatex.3494-1282232252/pst3dtest1.2.pdf ()

Since each part alone compiles (albeit without the curve in the yplane case), I can only assume
that the crash is a conflict between the two psset{plane=....} statements.  But then how do I go about creating the two planes and having them print together, but with hidden lines (which is why I am trying to use fusion)?

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/20100819/4fade133/attachment-0001.html>


More information about the PSTricks mailing list