<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm trying to draw some vector field pictures like those in the downloadable example file vectorField.tex, but having a little trouble "reverse engineering" the source code. &nbsp;The following is copied verbatim from the first part of that file:<div>*******************************************************************************************************</div><div><div>\SpecialCoor% importanmt for all examples</div><div>\begin{pspicture}(-6,-6)(6,6)</div><div>&nbsp;&nbsp;\psaxes{&lt;->}(0,0)(-6,-6)(6,6)</div><div>&nbsp;&nbsp;\psset{arrows=->}</div><div>&nbsp;&nbsp;\multido{\ia=-5+1}{11}{%</div><div>&nbsp;&nbsp; &nbsp;\multido{\ib=-5+1}{11}{%</div><div>&nbsp;&nbsp; &nbsp; &nbsp;\pstVerb{/x \ia\space def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /y \ib\space def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y 0 eq</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/ValueTempA 0 def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempB 0.5 def}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/ValueTempZ 2 1 x x mul y y mul div add sqrt mul def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempA 1 ValueTempZ div def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempB x y ValueTempZ mul div def}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifelse}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;\psline(! x ValueTempA sub y ValueTempB sub)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (! x ValueTempA add y ValueTempB add)}}</div><div>\end{pspicture}</div><div><br></div><div>\begin{pspicture}(-6,-6)(6,6)</div><div>&nbsp;&nbsp;\psaxes{&lt;->}(0,0)(-6,-6)(6,6)</div><div>&nbsp;&nbsp;\psset{arrows=->}</div><div>&nbsp;&nbsp;\multido{\ia=-5+1}{11}{%</div><div>&nbsp;&nbsp; &nbsp;\multido{\ib=-5+1}{11}{%</div><div>&nbsp;&nbsp; &nbsp; &nbsp;\pstVerb{/x \ia\space def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /y \ib\space def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y 0 eq</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/ValueTempA 0 def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempB 0.5 def}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/ValueTempZ 2 1 x x mul y y mul div add sqrt mul def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempA 1 ValueTempZ div def</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/ValueTempB x neg y ValueTempZ mul div def}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifelse}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;\psline(! x ValueTempA sub y ValueTempB sub)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (! x ValueTempA add y ValueTempB add)}}</div><div>\end{pspicture}</div><div><br></div><div>% From Michael Sharpe</div><div>******************************************************************************************************</div><div><br></div><div>I've tried reading about \pstVerb in TLGC2 (p. 305), and sort of understand it, but other bits of calligraphy (or syntax) are a mystery to me, like the forward slashes, or even more so the \ifelse at the end, and I am not quite sure of the logic of the construction. &nbsp;Am I correct that the lines enclosed in braces after \pstVerb define certain temporary values in terms of "x" and "y", which themselves are identified in the first two lines of the \pstVerb with ia and ib (from the multido) respectively? &nbsp;What is the syntax of the ensuing definition of the psline: am I correct that we are putting an arrow centered at (x,y) which corresponds to the vector (2 ValueTempA, 2ValueTempB)?</div><div> <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; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><br class="Apple-interchange-newline">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>