<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I did copy directly from the pdf, but I take your point that it didn't copy properly.<div>My problem is that the hyperboloid I want has different dimensions than the&nbsp;</div><div>example, so I need to understand the syntax of defining it. &nbsp;While I can follow&nbsp;</div><div>some postscript there are commands here which make no sense to me.</div><div>what is /z0? &nbsp;what does /k exch def mean?</div><div>what does idiv mean?</div><div>and which part defines the surface, as opposed to defining how it is broken</div><div>into faces?</div><div>OK, I guess I need to get a good reference for postscript. &nbsp;Any suggestions?</div><div><br></div><div>In trying to parse the code you gave me, I've done some indentation to</div><div>the code you gave me. &nbsp;I presume doing so will not affect the compiling.<br><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>On Jul 12, 2010, at 17:37, Michael Sharpe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Jul 12, 2010, at 12:49 PM, Zbigniew Nitecki wrote:<br><br><blockquote type="cite">I want to draw (in one pspicture) the level surfaces of f(x,y,z)=x^2+y^2-z^2 <br></blockquote><blockquote type="cite">for the values -1,0, and 1. &nbsp;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My attempt to do this with \parametricplotThreeD is not so successful: &nbsp;either I have<br></blockquote><blockquote type="cite">a collection of lines (and difficulty hiding some) or if I use enough plotpoints, the <br></blockquote><blockquote type="cite">inside stuff is totally wiped out. &nbsp;So I'm trying to see if I can do it more easily in<br></blockquote><blockquote type="cite">pst-solides3d.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The cone for 0 is easy. &nbsp;I tried to understand from<br></blockquote><blockquote type="cite">the example at the end of section 6.6.4, p. 90 in the (English) documentation for<br></blockquote><blockquote type="cite">pst-solides-3d how to draw a hyperboloid of one sheet in this system, but<br></blockquote><blockquote type="cite">I need someone to parse for me the function definitions embedded in it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Here is the code in the example:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">\begin{pspicture*}(-5,-5)(3,5) \psSolid[object=new,fillcolor=red!50,incolor=yellow,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">hollow, a=10, %% nb d’etages b=20, %% diviseur de 360, nb de meridiens h=8, %% hauteur action=draw**,sommets=<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">/z0 h neg 2 div def a-10{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">/k exch def 01b1 sub {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">/i exch def /r z0 h a div k mul add dup mul 4 div 1 add sqrt def 360 b idiv i mul cos r mul 360 b idiv i mul sin r mul z0 h a div k mul add<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">} for } for, faces={<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">0 1 a 1 sub { /k exch def k b mul 1 add 1 k 1 add b mul 1 sub { /i exch def [i i 1 sub b i add 1 sub b i add]<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">} for [k b mul k 1 add b mul 1 sub k 2 add b mul 1 sub k 1<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">add b mul] }for<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">}] \end{pspicture*}<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am having trouble understanding the structure of lines 3-8.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Can anyone explain it for me? &nbsp;I have (limited) experience with postscript, but none with jps.<br></blockquote><br>Your source code doesn't agree with the example---there may be a problem here copying from a pdf document. It should read<br><br>\begin{pspicture*}(-5,-5)(3,5) <br>\psSolid[object=new,fillcolor=red!50,incolor=yellow,<br><span class="Apple-tab-span" style="white-space:pre">        </span>hollow, a=10, %% nb d’etages <br><span class="Apple-tab-span" style="white-space:pre">        </span>b=20, %% diviseur de 360, nb de meridiens <br><span class="Apple-tab-span" style="white-space:pre">        </span>h=8, %% hauteur <br>action=draw**,<br><span class="Apple-tab-span" style="white-space:pre">        </span>sommets=<br><span class="Apple-tab-span" style="white-space:pre">                </span>/z0 h neg 2 div def a -1 0 {<br><span class="Apple-tab-span" style="white-space:pre">                        </span>/k exch def 0 1 b 1 sub {<br><span class="Apple-tab-span" style="white-space:pre">                        </span>/i exch def /r z0 h a div k mul add dup mul 4 div 1 add sqrt def 360 b idiv i mul cos r mul 360 b idiv i mul sin r mul z0 h a div k mul add<br><span class="Apple-tab-span" style="white-space:pre">                        </span>} for <br><span class="Apple-tab-span" style="white-space:pre">                </span>} for, <br><span class="Apple-tab-span" style="white-space:pre">        </span>faces={<br><span class="Apple-tab-span" style="white-space:pre">                </span>0 1 a 1 sub { /k exch def k b mul 1 add 1 k 1 add b mul 1 sub { /i exch def [i i 1 sub b i add 1 sub b i add]<br><span class="Apple-tab-span" style="white-space:pre">                        </span>} for [k b mul k 1 add b mul 1 sub k 2 add b mul 1 sub k 1 add<br><span class="Apple-tab-span" style="white-space:pre">                                </span>b mul] <br><span class="Apple-tab-span" style="white-space:pre">                        </span>} for<br><span class="Apple-tab-span" style="white-space:pre">                </span>}]<br>\end{pspicture*}<br><br><br>Michael<br><br><br>_______________________________________________<br>PSTricks mailing list<br><a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>http://tug.org/mailman/listinfo/pstricks<br>archive: http://www.tug.org/pipermail/pstricks/<br></div></blockquote></div><br></div></body></html>