<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Herbert,</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm trying to draw the equipotential lines of a
system of two equal charges at short distances (not a dipolar field), using
the implicit plotting scheme that you sugests.</FONT></DIV>
<DIV><FONT face=Arial size=2>Briefly, the function to be plotted
is:</FONT></DIV>
<DIV><FONT face=Arial size=2>V=k(1/r+1/r')</FONT></DIV>
<DIV><FONT face=Arial size=2>Placing the origin at the first charge, I
use the next definition at the pstVerb environment in Cartesian
coordinates:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>\pstVerb{%<BR>%------------------------ the implicit function
-----------------------<BR> /func { % parameter is the y
value<BR> /yVal exch def<BR>
1</DIV>
<DIV> x 2 exp<BR>
yVal 2 exp add sqrt div<BR> 1
<DIV> x 10 sub 2 exp</DIV>
<DIV> yVal 2 exp add sqrt div</DIV>
<DIV> add</DIV>
<DIV> 1 sub<BR> } def<BR>%------------------------ the
implicit function -----------------------<BR>}<BR></DIV>
<DIV><FONT face=Arial size=2>The compilation is OK, whith no errors, no
warnings, but when I try to open the ps file, I have a fatal error.
This is what apear at the screen:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>--- Begin offending input ---<BR>t begin STP
newpath 0.8 SLW 0 setgray 90 rotate /n -2 def<BR>/dx 28.45274
def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0<BR>CLW 2 div add def /y1
y2 neg def /x dx def n { x y1 moveto x y2 lineto<BR>stroke /x x dx add def }
repeat end<BR> <BR>@endspecial 779 1185 a Fa(\000)p Fb(1)779<BR>1421 y
Fa(\000)p Fb(2)975 921 y @beginspecial @setspecial<BR> <A
href="mailto:tx@Dict">tx@Dict</A> begin STP newpath 0.8 SLW 1 0 0
setrgbcolor /ArrowA { moveto<BR>} def /ArrowB { } def /x 0.2 def /x1 8 def
/dx x1 x sub 999 div def<BR>/xy { x 28.45274 mul .1 /eps1 0.0001 def /eps2
0.001 def /MaxIter<BR>10 def /y0 exch def /Iter 0 def { y0 func /F exch def F
abs eps2 lt<BR>{ exit } if y0 F sub /Phi exch def Phi func /F2 exch def F2 abs
eps2<BR>le { exit }{ Phi y0 sub dup mul Phi F2 sub 2 Phi mul sub y0 add
div<BR>/Diff exch def y0 Diff sub /y0 exch def Diff abs eps1 le { exit } if<BR>}
ifelse /Iter Iter 1 add def Iter MaxIter gt { exit } if } loop y0<BR>
28.45274 mul } def xy moveto 999 1 sub { /x x dx add def xy L
}<BR>repeat /x x1 def xy L gsave 0.8 SLW 1 0 0 setrgbcolor 0
setlinecap<BR>s<BR>--- End offending input ---<BR>file offset =
39411<BR>gsapi_run_string_continue returns -101</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What is the problem? It works fine with others
implicit functions, say xy=1.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Oscar Ecenarro</FONT></DIV></DIV></BODY></HTML>