|
From: Peter W. <pet...@nt...> - 2017-02-20 20:45:53
|
I attempted to draw a Roche potential surface given by the function
f(q,x,y) with q = 0.5 as shown in the program listing. The Potential f=
2.8758446321 should cross the x-axis at x= 0.5707515715. This it seems
to fail to do. It looks like the routine is failing to join successive
points of the closed contour together. I have used Plplot to do this
successfully.
reset
set monochrome
q = 0.5
f(q,x,y) = 1.0/sqrt(x**2+y**2) + q*(1.0/sqrt((x-1)**2+y**2) - x) +
0.5*(1+q)*(x**2+y**2)
#set view equal xy
set view map
#set size square
unset surface
set contour base
set isosamples 256,256
#set cntrparam levels discrete 2.001, 2.1, 2.2, 2.3, 2.407752, 2.48,
2.577260, 2.7, 2.87585, 3.2, 4.0
set cntrparam levels discrete 2.8,2.8758446321,3.0,4.0
set title "Roche with gnuplot"
set xlabel "x"
set ylabel "y"
#splot [-1.7:+2.3] [-2:2] f(q,x,y) notitle
splot [-0.575:+1.425] [-0.5:+0.5] f(q,x,y)
I attach a pdf of the result
--
Peter Williams
|