<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I want to use multido to draw arrows from the xy-plane to the graph of z=x^2&nbsp;+y^2 for a collection<div>of points in the rectangle [-1.5,1.5]\times[0,1.5]. &nbsp;The following code</div><div>*********************************************************************************<br><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                </span>\multido{\rx=-1.5+0.12}{26}{%</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                        </span>\multido{\ry=0+0.06}{26}{%</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                                </span>\pstThreeDLine[arrows=->]%</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                                        </span>(\rx,\ry,0)%</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                                        </span>(!\rx\space \ry\space \rx\space 2 exp \ry\space 2 exp add)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div>*************************************************************************************</div><div>produces no errors, but also produces no arrows. &nbsp;If I try to define a function</div><div>**************************************************************************************</div><div>\newcommand{\hit}[2]{! #1\space 2 exp #2\space 2 exp add}<span class="Apple-tab-span" style="white-space:pre">        </span></div><div>****************************************************************************************</div><div>and replace the last set of coordinates with</div><div>*****************************************************</div><div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>(\rx, \ry, \hit{\rx}{\ry})</div><div>*******************************************************</div></div><div>I get the error message</div><div>********************************************************</div><div><div>Runaway definition?</div><div>->/ArrowA { moveto } def /ArrowB { BeginArrow 1. &nbsp;1. &nbsp;scale &nbsp;false 0.\ETC.</div><div>! TeX capacity exceeded, sorry [main memory size=1500000].</div><div>\pst@code ...sub x2 x1 sub Atan def ArrowA x1 Alph</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a cos arrowlength mul add ...</div><div>l.52 <span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div>********************************************************</div><div>(This I almost understand: &nbsp;I am trying to use a latex command to define a postscript function---so how do I do that?)</div><div>So just to test things I tried</div><div>*******************************</div><div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\multido{\rx=-1.5+0.12}{26}{%</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>\multido{\ry=0+0.06}{26}{%</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>\pstThreeDLine[arrows=->]%</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>(\rx,\ry,0)%</div><div>%<span class="Apple-tab-span" style="white-space:pre">                                        </span>(!\rx\space \ry\space \rx\space 2 exp \ry\space 2 exp add)</div><div>%<span class="Apple-tab-span" style="white-space:pre">                                        </span>(\rx, \ry, \hit{\rx}{\ry})</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>(\rx,\ry,1)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div>******************************************</div><div>and got no error, but still no arrows. &nbsp;Now I am really confused. &nbsp;What have I screwed up now?</div><div><br></div><div>My real question, though, is:</div></div><div>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?</div></div></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Zbigniew Nitecki</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Department of Mathematics</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Tufts University</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medford, MA 02155</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">telephones:</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office<span class="Apple-converted-space"><span class="Apple-converted-tab">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span>(617)627-3843</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Dept.<span class="Apple-converted-space"><span class="Apple-converted-tab">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span>(617)627-3234</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Dept. fax<span class="Apple-converted-space"><span class="Apple-converted-tab">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span>(617)627-3966</font></p><a href="http://www.tufts.edu/~znitecki/">http://www.tufts.edu/~znitecki/</a></span> </div><br></div></body></html>