/* mandelbrot.nut This is a port of Ken Perlins ASCII Mandelbrot program. The original code can be found here http://mrl.nyu.edu/~perlin/ */ local i,j,r,x,y=-16.0,k=0; while(print(""),y++<15) for(x=0.0;x++<80; print(((" .:-;!/>)|&IH%*#")[k&15]).tochar()) ) for(i=r=j=0.0,k=0;j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i<11&&k++<111;r=j);