[pstricks] multido

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Tue Feb 17 16:31:56 CET 2009

I am trying to plot the surface z=4x^2 +y^2 but only for values z<=1;   
I am trying to do this by
plotting a "vertical slice" at y=\ry via a multido.  What's wrong with  
this code?

				0.5 1 \ry\space dup mul sub 0.5 exp mul neg,
				0.5 1 \ry\space dup mul sub 0.5 exp mul){%
					t %
					\ry %
					t dup mul 4 mul \ry\space dup mul add%

I get the error message

Error: /undefined in !0.5
Operand stack:
Execution stack:
    %interp_exit   .runexec2   --nostringval--   --nostringval--   -- 
nostringval--   2   %stopped_push   --nostringval--   -- 
nostringval--   --nostringval--   false   1   %stopped_push   1905    
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3    
%oparray_pop   1771   1   3   %oparray_pop   --nostringval--    
%errorexec_pop   .runexec2   --nostringval--   --nostringval--   -- 
nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
    --dict:1148/1684(ro)(G)--   --dict:0/20(G)--   --dict: 
119/200(L)--   --dict:177/300(L)--   --dict:38/200(L)--   --dict:122/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 138589
GPL Ghostscript 8.62: Unrecoverable error, exit code 1
### FAILED to generate /tmp/altpdflatex.22827-1234884508/ 
picturetest1.pdf ()

Or is there a way to do this via clipping?  (ie,  \psplotThreeD(-1,1) 
(-1,1){x dup mul 4 mul y dup mul add} followed by a clipping command  
that only allows z<=1)

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090217/37cbeb06/attachment.html 

More information about the PSTricks mailing list