block



Adn 3d version


**************************************
/* batch file = script for Maxima */
/* global variables */
xMin:-3.0;
xMax:3.0;
yMin:-3.0;
yMax:3.0;
iMax:100;
ER:2.0;
/* definition of function  */
LastIteration(x,y):=
block
(
z:x+y*%i,
i:0,
if (abs(z)>ER) then return(i),
loop,
z:z*z,
i:i+1,
if ((abs(z)<ER) and (i<iMax)) then go(loop),
return(i)
);
/* drawing */
my_preamble: "set xtics  10; set ytics  10";
plot3d(LastIteration,[x,xMin,xMax],[y,yMin,yMax],[gnuplot_preamble, 
my_preamble]);
**********************************************


Adam