<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am not sure what is wrong with the following code; &nbsp;I am drawing the surface z=xy over the square [0,1]\times[0,1] (this works fine, if the multido is commented out) and then to draw&nbsp;<div>unit normal vectors to this surface.<br><div>***********************************************************************</div><div><div>%!TEX TS-program = &nbsp;latex</div><div>\documentclass[11pt]{article}</div><div>\usepackage{amsmath, amssymb}</div><div>\usepackage[dvipsnames, svgnames]{pstricks}</div><div>\usepackage{pst-plot, pst-math, pst-3dplot}</div><div>\usepackage{pst-grad, pst-func, pst-text}</div><div>\usepackage{pstricks-add}</div><div>\title{Brief Article}</div><div>\author{The Author}</div><div>\begin{document}</div><div>\maketitle</div><div>\begin{figure}[htbp]</div><div>\begin{center}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>\begin{pspicture}(-3.5,-3)(3.5,3.5)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>\psset{Alpha=-30, unit=3}</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\pstThreeDCoor[xMin=0, xMax=1.5, yMin=0, yMax=1.5, zMin=0, zMax=2]</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\pstThreeDSquare[fillstyle=solid, fillcolor=gray, linestyle=none](0,0,0)(1,0,0)(0,1,0)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\psplotThreeD[xPlotpoints=10, yPlotpoints=10, drawStyle=xyLines](0,1)(0,1){x y mul}</div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\newcommand{\veclength}[3]{%</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>#1 dup mul #2 dup mul #3 dup mul add add 0.5 exp</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>\newcommand{\makevector}[3]{%</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>\pstThreeDLine[arrows=->, arrowscale=2, linewidth=2pt](0,0,0)(#1,#2,#3)%</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><span class="Apple-tab-span" style="white-space:pre">                </span>\multido{\rx=0+0.1}{10}{%</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>\multido{\ry=0+0.1}{10}{%</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>\pstThreeDPut(!\rx, \ry, \rx\space \ry\space mul){%</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>\makevector{\ry\space \veclength{\rx}{\ry}{1}\space div neg}%</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>{\rx\space \veclength{\rx}{\ry}{1}\space div neg}%</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>{1 \veclength{\rx}{\ry}{1}\space div neg}%</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><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>\end{pspicture}</div><div>\label{fig:fluxint1}</div><div>\end{center}</div><div>\end{figure}</div><div><br></div><div><br></div><div><br></div><div>\end{document}</div><div>************************************************************************************************</div><div>Here is my console output:</div><div>############################################################</div><div><div>### This is /usr/texbin/simpdftex, Version 20070809</div><div>### /usr/texbin/latex MinimalPST3DTest.tex</div><div>This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)</div><div>&nbsp;%&amp;-line parsing enabled.</div><div>entering extended mode</div><div>(./MinimalPST3DTest.tex</div><div>LaTeX2e &lt;2005/12/01></div><div>Babel &lt;v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh</div><div>yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar</div><div>abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc</div><div>h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono</div><div>greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la</div><div>tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus</div><div>sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis</div><div>h, ukrainian, uppersorbian, welsh, loaded.</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls</div><div>Document Class: article 2005/09/16 v1.4f Standard LaTeX document class</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size11.clo))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsmath.sty</div><div>For additional information on amsmath, use the `?' option.</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amstext.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsgen.sty))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsbsy.sty)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsopn.sty))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amssymb.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amsfonts.sty))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/latex/pstricks.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.tex</div><div>`PSTricks' v1.26 &nbsp;&lt;2008/07/31> (tvz)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.con))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/xcolor/xcolor.sty</div><div>(/usr/local/texlive/2008/texmf/tex/latex/config/color.cfg)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/dvips.def)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/dvipsnam.def)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/xcolor/svgnam.def)))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/latex/pst-plot.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pst-plot.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/multido/multido.tex</div><div>&nbsp;v1.41, 2004/05/18 &lt;tvz>) &nbsp;v1.01, 2008/01/26))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-math/pst-math.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-math/pst-math.tex</div><div>`pst-math' v0.3 (Rev 1.0, 2004-06-15 22:29:36+02), C.Jorssen))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-3d/pst-3d.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/pst-xkey.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/xkeyval/xkeyval.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/xkeyval.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/keyval.tex))))</div><div>`PST-3d' v1.00, 2005/09/03 (tvz))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pst-node.tex</div><div>&nbsp;v1.00, 2007/10/16) `pstricks-add' v3.08, 2008/08/06 (dr,hv))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/multido/multido.tex</div><div>&nbsp;v1.41, 2004/05/18 &lt;tvz>) `PST-3dplot' v1.80, 2008/02/08 (HV,DL)))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-grad/pst-grad.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-grad/pst-grad.tex</div><div>`pst-grad' v1.06, 2006/11/27 (tvz,dg,hv)))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-func/pst-func.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-func/pst-func.tex</div><div>`PST-func' v0.55, 2008/06/12 (hv)))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pst-text/pst-text.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pst-text/pst-text.tex</div><div>&nbsp;v1.00, 2006/11/05(tvz,hv)))</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty</div><div>(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex))</div><div><br></div><div>No file MinimalPST3DTest.aux.</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsa.fd)</div><div>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsb.fd) [1]</div><div>(./MinimalPST3DTest.aux)</div><div><br></div><div>LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.</div><div><br></div><div>&nbsp;)</div><div>Output written on MinimalPST3DTest.dvi (1 page, 478444 bytes).</div><div>Transcript written on MinimalPST3DTest.log.</div><div>### /usr/texbin/dvips -R -Poutline &nbsp;-o /tmp/altpdflatex.4410-1231358305/MinimalPST3DTest.ps MinimalPST3DTest.dvi</div><div>This is dvips(k) 5.97 Copyright 2008 Radical Eye Software (<a href="http://www.radicaleye.com">www.radicaleye.com</a>)</div><div>' TeX output 2009.01.07:1458' -> /tmp/altpdflatex.4410-1231358305/MinimalPST3DTest.ps</div><div>&lt;/usr/local/texlive/2008/texmf/dvips/base/tex.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pstricks/pstricks.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-algparser.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-dots.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pst-math/pst-math.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pstricks/pst-node.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pstricks-add/pstricks-add.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pst-grad/pst-grad.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pst-func/pst-func.pro></div><div>&lt;/usr/local/texlive/2008/texmf-dist/dvips/pst-text/pst-text.pro></div><div>&lt;/usr/local/texlive/2008/texmf/dvips/base/texps.pro></div><div>&lt;/usr/local/texlive/2008/texmf/dvips/base/special.pro></div><div>&lt;/usr/local/texlive/2008/texmf/dvips/base/color.pro>.&nbsp;</div><div>&lt;/usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></div><div>&lt;/usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmmi10.pfb></div><div>&lt;/usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr12.pfb></div><div>&lt;/usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb>[1]&nbsp;</div><div>### ps2pdf13 /tmp/altpdflatex.4410-1231358305/MinimalPST3DTest.ps /tmp/altpdflatex.4410-1231358305/MinimalPST3DTest.pdf</div><div>Error: /undefined in !0.0</div><div>Operand stack:</div><div><br></div><div>Execution stack:</div><div>&nbsp;&nbsp; %interp_exit &nbsp; .runexec2 &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; 2 &nbsp; %stopped_push &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; false &nbsp; 1 &nbsp; %stopped_push &nbsp; 1905 &nbsp; 1 &nbsp; 3 &nbsp; %oparray_pop &nbsp; 1904 &nbsp; 1 &nbsp; 3 &nbsp; %oparray_pop &nbsp; 1888 &nbsp; 1 &nbsp; 3 &nbsp; %oparray_pop &nbsp; 1771 &nbsp; 1 &nbsp; 3 &nbsp; %oparray_pop &nbsp; --nostringval-- &nbsp; %errorexec_pop &nbsp; .runexec2 &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; 2 &nbsp; %stopped_push &nbsp; --nostringval-- &nbsp; --nostringval-- &nbsp; --nostringval--</div><div>Dictionary stack:</div><div>&nbsp;&nbsp; --<a href="dict:1148/1684(ro)(G)--">dict:1148/1684(ro)(G)--</a> &nbsp; --<a href="dict:0/20(G)--">dict:0/20(G)--</a> &nbsp; --<a href="dict:122/200(L)--">dict:122/200(L)--</a> &nbsp; --<a href="dict:178/300(L)--">dict:178/300(L)--</a> &nbsp; --<a href="dict:104/200(L)--">dict:104/200(L)--</a> &nbsp; --<a href="dict:56/400(L)--">dict:56/400(L)--</a> &nbsp; --<a href="dict:0/10(L)--">dict:0/10(L)--</a> &nbsp; --<a href="dict:104/200(L)--">dict:104/200(L)--</a> &nbsp; --<a href="dict:95/200(L)--">dict:95/200(L)--</a></div><div>Current allocation mode is local</div><div>Last OS error: 2</div><div>Current file position is 182602</div><div>GPL Ghostscript 8.62: Unrecoverable error, exit code 1</div><div>### FAILED to generate /tmp/altpdflatex.4410-1231358305/MinimalPST3DTest.pdf ()</div><div>#################################################################</div><div><br></div></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></div></body></html>