[pstricks] still confused by fusion: which objects can be fused?

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Mon Jul 26 15:34:37 CEST 2010


Thanks, Herbert.  Your example works fine.
Now I want to illustrate the plane(s) which produces the curve(s) on
the surface, as well as the tangent plane.
In the code below, when run as written I get the picture following, but when I replace the two action=draw**
with the currently commented out stuff, I get an error message.  I still do not understand this, unless there is
a problem with trying to fuse an object=plan with another \psSolid:
 ##################################################
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> \usepackage{graphicsmacros}
> \begin{document}
> \begin{center}
> 		\begin{pspicture}(-0.5,-3.5)(3,3.5)
> %	\psset{solidmemory}
> 				\psset{lightsrc=50 40 30, viewpoint=15 30 50 rtp2xyz,
> 					Decran=50}
> 				
> 				\defFunction[algebraic]{SurfFunction}(x,y){}{} { (x^2-3*y^2)/2 }
> 				\psSolid[object=surface,
> 					 fillcolor=lightgray,
> 					 incolor=green,
> 					 ngrid=0.1 0.1,
> 					 base=0 1.5 0 1.0,
> 					 function=SurfFunction,
> 					 grid,% comment it out to see meaning of ngrid
> 		 action=draw**,
> %	action=none,
> 				name=graphsurf,
> 					]
> %
> 			\psSolid[object=plan,
> 				definition=normalpoint,
> 				args={1.0 0.5 0.125 [-1.0 1.5 1]},
> 				fillcolor=red!50,
> 				opacity=0.1,
> 				base=-0.75 0.75 -0.5 0.5,
> 		action=draw**,
> %	action=none,
> 				name=tanplane,
> 				]
> %			
> %	\psSolid[object=fusion,
> %	action=draw**,
> %	base=graphsurf tanplane, 
> %	]
> %%			
> %	\composeSolid
> 
> 		\end{pspicture}
> \end{center}
> \end{document}
########################################################


################################################################
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> \usepackage{graphicsmacros}
> \begin{document}
> \begin{center}
> 		\begin{pspicture}(-0.5,-3.5)(3,3.5)
> 	\psset{solidmemory}
> 				\psset{lightsrc=50 40 30, viewpoint=15 30 50 rtp2xyz,
> 					Decran=50}
> 				
> 				\defFunction[algebraic]{SurfFunction}(x,y){}{} { (x^2-3*y^2)/2 }
> 				\psSolid[object=surface,
> 					 fillcolor=lightgray,
> 					 incolor=green,
> 					 ngrid=0.1 0.1,
> 					 base=0 1.5 0 1.0,
> 					 function=SurfFunction,
> 					 grid,% comment it out to see meaning of ngrid
> %		 action=draw**,
> 	action=none,
> 				name=graphsurf,
> 					]
> %
> 			\psSolid[object=plan,
> 				definition=normalpoint,
> 				args={1.0 0.5 0.125 [-1.0 1.5 1]},
> 				fillcolor=red!50,
> 				opacity=0.1,
> 				base=-0.75 0.75 -0.5 0.5,
> %		action=draw**,
> 	action=none,
> 				name=tanplane,
> 				]
> 			
> 	\psSolid[object=fusion,
> 	action=draw**,
> 	base=graphsurf tanplane, 
> 	]
> %			
> 	\composeSolid
> 
> 		\end{pspicture}
> \end{center}
> \end{document}
#############################################################
> Error: /typecheck in --length--
> Operand stack:
>    --nostringval--   S   result   528   1.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--   --nostringval--   --nostringval--
> Dictionary stack:
>    --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:782/1012(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:184/200(L)--   --dict:782/1012(L)--   --dict:2/11(L)--   --dict:5/5(L)--   --dict:2/3(L)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 423569
> GPL Ghostscript 8.70: Unrecoverable error, exit code 1
> ### FAILED to generate /tmp/altpdflatex.76541-1280150661/pst3d test 1.3.7.pdf ()

#######################################################################
I recall reading in the docs that object=plan creates two distinct objects, one of type plan,
the other of type solid.  Is this the root of the problem?  Somehow I don't think so;  if instead of the plane
I try an object vecteur, I get a similar error message.  So what is it I am doing wrong?
######################################################################
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> \usepackage{graphicsmacros}
> \begin{document}
> \begin{center}
> 		\begin{pspicture}(-0.5,-3.5)(3,3.5)
> 	\psset{solidmemory}
> 				\psset{lightsrc=50 40 30, viewpoint=15 30 50 rtp2xyz,
> 					Decran=50}
> 				
> 				\defFunction[algebraic]{SurfFunction}(x,y){}{} { (x^2-3*y^2)/2 }
> 				\psSolid[object=surface,
> 					 fillcolor=lightgray,
> 					 incolor=green,
> 					 ngrid=0.1 0.1,
> 					 base=0 1.5 0 1.0,
> 					 function=SurfFunction,
> 					 grid,% comment it out to see meaning of ngrid
> %		 action=draw**,
> 	action=none,
> 				name=graphsurf,
> 					]
> 
> 			\psSolid[object=vecteur,
> 			linecolor=red,
> 			definition={[.05 0.3]},
> 			args=-1.0 1.5 1,
> %		action=draw**,
> 	action=none,
> 			name=normalvector,
> 				] (1.0,0.5,0.125)
> 
> 	\psSolid[object=fusion,
> 	action=draw**,
> 	base=graphsurf normalvector, 
> 	]
> %			
> 	\composeSolid
> 
> 		\end{pspicture}
> \end{center}
> \end{document}
################################################################
> Error: /typecheck in --get--
> Operand stack:
>    --nostringval--   -1.0   --nostringval--   1.5   S1   1   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--   2   --nostringval--   %repeat_continue   --nostringval--
> Dictionary stack:
>    --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:779/1012(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:184/200(L)--   --dict:779/1012(L)--   --dict:2/11(L)--   --dict:2/5(L)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 423553
> GPL Ghostscript 8.70: Unrecoverable error, exit code 1
> ### FAILED to generate /tmp/altpdflatex.76688-1280151121/pst3d test 1.3.7.pdf ()



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/

On Jul 25, 2010, at 15:36, Herbert Voss wrote:

> 
> use \psSurface only when you want to draw a single
> 3d function. When using a fusion then use always
> \psSolid:
> 
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> \begin{document}
> \begin{pspicture}(-0.5,-2)(3,3)
> \psset{lightsrc=50 20 50, viewpoint=15 60 70 rtp2xyz,
> Decran=50}
> \defFunction[algebraic]{Func}(x,y){}{}{ (x^2-3*y^2)/2 }
> \psSolid[
>  object=surface,
>  fillcolor=lightgray,
>  incolor=green,
>  ngrid=0.1 0.1,
>  base= -1 1 -1.5 1.5,
>  function=Func,
>  action=none,
>  name=graphsurf]
> \defFunction[algebraic]{curvey}(t){t}{1} {0.5*t^2-1.5}
> \psSolid[%
>  object=courbe,
>  r=0.01,
>  range=-1.0 1.0,
>  resolution=720,
>  linecolor=blue,
>  linewidth=1pt,
>  function=curvey,
>  action=none,
>  name=curvey,
> ]%
> \defFunction[algebraic]{curvex}(t){0.5}{t}{0.125-1.5*t^2}
> \psSolid[%
>  object=courbe,
>  r=0.01,
>  range=-1.5 1.5,
>  resolution=720,
>  linecolor=white,
>  linewidth=1pt,
>  function=curvex,
>  action=none,
>  name=curvex,
> ]%
> \psSolid[
>  object=fusion,
>  action=draw**,
>  base=graphsurf curvey curvex,
> ]
> \composeSolid
> \end{pspicture}
> 
> \end{document}
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100726/c464e4fc/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pst3d test 1.3.7.pdf
Type: application/pdf
Size: 23915 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100726/c464e4fc/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100726/c464e4fc/attachment-0003.html>


More information about the PSTricks mailing list