[pstricks] computed coordinates

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Fri Aug 8 17:11:55 CEST 2008


I want to use multido to draw arrows from the xy-plane to the graph of  
z=x^2 +y^2 for a collection
of points in the rectangle [-1.5,1.5]\times[0,1.5].  The following code
*********************************************************************************
		\multido{\rx=-1.5+0.12}{26}{%
			\multido{\ry=0+0.06}{26}{%
				\pstThreeDLine[arrows=->]%
					(\rx,\ry,0)%
					(!\rx\space \ry\space \rx\space 2 exp \ry\space 2 exp add)
			}
		}
*************************************************************************************
produces no errors, but also produces no arrows.  If I try to define a  
function
**************************************************************************************
\newcommand{\hit}[2]{! #1\space 2 exp #2\space 2 exp add}	
****************************************************************************************
and replace the last set of coordinates with
*****************************************************
					(\rx, \ry, \hit{\rx}{\ry})
*******************************************************
I get the error message
********************************************************
Runaway definition?
->/ArrowA { moveto } def /ArrowB { BeginArrow 1.  1.  scale  false  
0.\ETC.
! TeX capacity exceeded, sorry [main memory size=1500000].
\pst at code ...sub x2 x1 sub Atan def ArrowA x1 Alph
                                                   a cos arrowlength  
mul add ...
l.52 		}
********************************************************
(This I almost understand:  I am trying to use a latex command to  
define a postscript function---so how do I do that?)
So just to test things I tried
*******************************
		\multido{\rx=-1.5+0.12}{26}{%
			\multido{\ry=0+0.06}{26}{%
				\pstThreeDLine[arrows=->]%
					(\rx,\ry,0)%
%					(!\rx\space \ry\space \rx\space 2 exp \ry\space 2 exp add)
%					(\rx, \ry, \hit{\rx}{\ry})
					(\rx,\ry,1)
			}
		}
******************************************
and got no error, but still no arrows.  Now I am really confused.   
What have I screwed up now?

My real question, though, is:
Is there a way to use mutlido with commands like \pstThreeDLine in  
which certain coordinates depend in a non-trivial way on the multido  
parameter?

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/20080808/bd542921/attachment.html 


More information about the PSTricks mailing list