//mandel.java import java.awt.*; import java.util.*; public class mandel extends java.applet.Applet implements Runnable{ public double dx1=-2.0,dx2=2.0,dy1=-2.0,dy2=2.0; int x1,y1,x2,y2; Image offscreenImage; Graphics offscreenGfx; Thread t; public void init(){ Dimension r = size(); x1 = 0; y1 = 0; x2 = r.width; y2 = r.height; offscreenImage = createImage(r.width,r.height); offscreenGfx = offscreenImage.getGraphics(); } public String getAppletInfo() { String ainfo = "MandelZoom v.0.1 (19 May 1996), by Task"; return ainfo; } public void start(){ if(t==null){ t=new Thread(this); t.start(); } } public void stop (){ if(t!=null){ t.stop(); t=null; } } public void update(Graphics g) { paint(g); } public void clear (Graphics g,int width,int height){ Color saveC; saveC = g.getColor(); g.setColor(Color.black); g.fillRect(0,0,width,height); g.setColor(saveC); } public void run(){ int x,y,r=32,s; double xs,ys,x0,y0,zr,zi,zr0,zi0,mx1,my1,mx2,my2; Graphics g; Date now; long miliTime; mx1 = dx1; mx2 = dx2; my1 = dy1; my2 = dy2; xs=(mx2-mx1)/(x2-x1); ys=(my2-my1)/(y2-y1); g = offscreenGfx; clear(g,offscreenImage.getWidth(this),offscreenImage.getHeight(this)); now = new Date(); miliTime = now.getTime(); for(y=y1;y<=y2;y++){ y0 = my1+(y-y1)*ys; for(x=x1;x<=x2;x++){ x0 = mx1+(x-x1)*xs; zr0 = x0; zi0 = y0; for(s=0;s=4.0) break; zr0=zr; zi0=zi; } if(s