import java.applet.*; import java.awt.*; import java.awt.image.*; import shtick.math.Complex; ////////////////////////////////////////////////////// //**************************************************// //* Mandelbrot Applet *// //* *// //* Version 1.2.1 *// //* Author: Sean M. Cox *// //* Organization: The Shtick *// //* http://www.smcox.com/ *// //* *// //* Renders a Mandelbrot fractal and demonstrates *// //* the usage of complex numbers. *// //* *// //**************************************************// ////////////////////////////////////////////////////// public class Mandelbrot extends Applet{ int pixels[]; int domain; int range; boolean renderNew=true; Image fractal; long time; String error="Uncertain"; public Mandelbrot(){} public void paintFractal(Graphics g){ double xUnit=(double)4/domain; double yUnit=(double)4/range; double y=yUnit/2-2; final int colorInc=0x060606; for(int py=0;py