<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">As a solution to the baby problem, this is brilliant. But is there a way to clip a \pstThreeDPlot<div>or \parametricplotThreeD?<div>What I really want to do is to graph a function (in my case, (x^2-y^2)/2 ) over a circle (but both the above-mentioned allow only graphs over a rectangle; if I translate into a polar form to get the circular domain, then the lines go radially (or are circles) instead of being x-lines and y-lines.</div><div>This is why I wanted to use the multido.</div><div><br></div><div>Perhaps I am unclear on the function of \function in Herbert's example. I thought that it is defined as the calculation [-2(xVal)+8]/[2(xVal)-2]. So where it says </div><div>\pstVerb{/xVal \function\space def}, what is the function of \function?</div><div><br></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; "><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"> <span class="Apple-converted-space"> </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"> <span class="Apple-converted-space"> </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"> <span class="Apple-converted-space"> </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>On Nov 21, 2008, at 14:08, Michael Sharpe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>In Herbert's code, xVal is incremented in PostScript code in the line<br>pstVerb{ /xVal \function\space def}<br><br>You might find it easier for your particular problem to use clipping, <br>as in:<br><br>\begin{pspicture}[showgrid=true](-1.5,-1.5)(1.5,1.5)<br>\begin{psclip}{\pscircle{1}}<br>\multido{\n=-1+.25}{9}{\psline(-1,\n)(1,\n)\psline(\n,-1)(\n,1)}<br>\end{psclip}<br>\end{pspicture}<br><br>Michael<br><br>On Nov 21, 2008, at 10:26 AM, Zbigniew Nitecki wrote:<br><br><blockquote type="cite">The following is copied from one of Herbert's responses to someone <br></blockquote><blockquote type="cite">else:<br></blockquote><blockquote type="cite">********************************************************************************<br></blockquote><blockquote type="cite">\documentclass{article}<br></blockquote><blockquote type="cite">\usepackage{amsmath}<br></blockquote><blockquote type="cite">\usepackage{pstricks-add}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">\begin{document}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">\begin{center}<br></blockquote><blockquote type="cite">\psset{xunit=2cm,yunit=2cm,algebraic=true}<br></blockquote><blockquote type="cite">\begin{pspicture}[showgrid=true](-5,-5)(1,1)<br></blockquote><blockquote type="cite"> \psaxes{->}(0,0)(-5,-5)(1,1)[$x$,-90][$y$,180]%<br></blockquote><blockquote type="cite"> \rput(-2,-3){{$y=\dfrac{-2x+8}{~~2x-2}$}}%<br></blockquote><blockquote type="cite"> \psplot {-5}{0.10}{x }%<br></blockquote><blockquote type="cite"> \psplot[linecolor=red,linewidth=1.5pt]{-5}{0.10}{(-2*x+8)/(2*x-2)}%<br></blockquote><blockquote type="cite"> \def\function{ -2 xVal mul 8 add 2 xVal mul -2 add div }%<br></blockquote><blockquote type="cite"> \pstVerb{ /xVal 0 def }% start value<br></blockquote><blockquote type="cite"> \multido{\nA=0+1}{4}{%<br></blockquote><blockquote type="cite"> \psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal xVal )(! xVal<br></blockquote><blockquote type="cite">\function )<br></blockquote><blockquote type="cite"> \psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal \function )(!<br></blockquote><blockquote type="cite">\function\space dup)<br></blockquote><blockquote type="cite"> \pstVerb{ /xVal \function\space def}<br></blockquote><blockquote type="cite"> \psline[linestyle=dashed,linecolor=blue]{->}(! xVal xVal)(! xVal <br></blockquote><blockquote type="cite">0 )<br></blockquote><blockquote type="cite"> \uput{1ex}[90](! xVal 0 ){$v_{\nA}$}<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite">\end{pspicture}<br></blockquote><blockquote type="cite">\end{center}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">\end{document}<br></blockquote><blockquote type="cite">********************************************************************************************<br></blockquote><blockquote type="cite">I am trying to use this as a model for plotting a function using a <br></blockquote><blockquote type="cite">rectangular grid, but over<br></blockquote><blockquote type="cite">a non-rectangular region. My basic question can be formulated even <br></blockquote><blockquote type="cite">letting the function be<br></blockquote><blockquote type="cite">the zero constant: so filling say the circle of radius 1 in the xy- <br></blockquote><blockquote type="cite">plane with lines parallel to the<br></blockquote><blockquote type="cite">coordinate axes, spaced 0.25 apart. My model is as follows, but my <br></blockquote><blockquote type="cite">question is what goes in the places marked with ??: I can't <br></blockquote><blockquote type="cite">understand where in the example above the value of xVal is<br></blockquote><blockquote type="cite">incremented, or equivalently, the role of \nA. Of course, if I am <br></blockquote><blockquote type="cite">making other sytactic errors,<br></blockquote><blockquote type="cite">I'll be grateful for advice about them as well.<br></blockquote><blockquote type="cite">***********************************************************************************************<br></blockquote><blockquote type="cite">\def\function{1 tVal dup mul sub exp 0.5}<br></blockquote><blockquote type="cite">\pstVerb{tVal -0.75 def}<br></blockquote><blockquote type="cite">\multido{??=??}{6}{%<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>\psline(!\function \neg tVal)(!\function tVal)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>\psline{!tVal \function \neg){!tVal \function)<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite">***************************************************************************************************<br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>PSTricks mailing list<br><a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>http://tug.org/mailman/listinfo/pstricks<br></div></blockquote></div><br></div></div></body></html>