Subject: Complicated functions fail to keep plotting
From: Mario Rodriguez
Date: Mon, 14 Apr 2008 18:22:35 +0200
> for i: 1 thru 20 do
> str:concat(str,",explicit(f[",string(i),"](x),x,-4,4,y,",string(i/600*50),",",string(i/600*50),")");
>
> str1:concat("draw3d(", str, ",yrange=[0,50]," ,
> "user_preamble = \"set title 'Anharmonic Potential m k^2 x^4 (600 by
> 600) First 100 Terms'; set xlabel 'Psi^2'; set ylabel 'Energy';set
> pm3d;set pm3d map;unset surf\")$")$
>
Richard,
With this code, from gnuplot's point of view, you are not drawing a
surface, but a set of curves, or a lot of surfaces of width zero, if you
prefere:
explicit(f[0](x),x,-4,4,y,0,0),
explicit(f[1](x),x,-4,4,y,1/12,1/12),
explicit(f[2](x),x,-4,4,y,1/6,1/6),
explicit(f[3](x),x,-4,4,y,1/4,1/4),
explicit(f[4](x),x,-4,4,y,1/3,1/3),.....
I would try to build a 2d surface z(x,y) from your f[n](x) functions
(maybe through interpolation?) and draw it:
draw3d(explicit(z(x,y),x,-4,4,y,0,2), ....options....);
--
Mario Rodriguez Riotorto
http://www.telefonica.net/web2/biomates