[pstricks] multido

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Fri Nov 21 19:26:31 CET 2008

The following is copied from one of Herbert's responses to someone else:


  \psplot {-5}{0.10}{x }%
  \def\function{ -2 xVal mul 8 add 2 xVal mul -2 add div }%
  \pstVerb{ /xVal 0 def }% start value
    \psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal xVal )(! xVal
\function )
    \psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal \function )(!
\function\space dup)
    \pstVerb{ /xVal \function\space def}
    \psline[linestyle=dashed,linecolor=blue]{->}(! xVal xVal)(! xVal 0 )
    \uput{1ex}[90](! xVal 0 ){$v_{\nA}$}

I am trying to use this as a model for plotting a function using a  
rectangular grid, but over
a non-rectangular region.  My basic question can be formulated even  
letting the function be
the zero constant:  so filling say the circle of radius 1 in the xy- 
plane with lines parallel to the
coordinate axes, spaced 0.25 apart.  My model is as follows, but my  
question is what goes in the places marked with ??: I can't understand  
where in the example above the value of xVal is
incremented, or equivalently, the role of \nA.  Of course, if I am  
making other sytactic errors,
I'll be grateful for advice about them as well.
\def\function{1 tVal dup mul sub exp 0.5}
\pstVerb{tVal -0.75 def}
	\psline(!\function \neg tVal)(!\function tVal)
	\psline{!tVal \function \neg){!tVal \function)

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/20081121/4ba49648/attachment.html 

More information about the PSTricks mailing list