CN[] rts = new CN[5]; color[] colA = new color[5]; void setup() { size(400, 500); BFont metaBold; metaBold = loadFont("Meta.vlw.gz"); textFont(metaBold, 40); textMode(ALIGN_LEFT); stroke(0,0,255); text("Fractal", 150, 430); textFont(metaBold, 30); text("Basin of attraction, 5th roots of unity", 20, 460); textFont(metaBold, 24); textMode(ALIGN_LEFT); text("Click me to start/clear", 0, 495); for (int m =0; m<5; m++) rts[m] = new CN(cos(TWO_PI*m/5), sin(TWO_PI*m/5)); colA[0] = color(255,0,0); colA[1] = color(0,255,0); colA[2] = color(0,0,255); colA[3] = color(255,255,0); colA[4] = color(0,255,255); } CN z1 = new CN(3.0,5.0); CN z2 = new CN(5.0,6.0); boolean b1; int kmax = 20; float sc = 100.0; void loop() { doit(b1); } void doit(boolean b2){ if (b2){ noStroke(); colorMode(RGB, 255); for(int i=0; i<400; i++) for(int j=0; j<400; j++){ z1.r = (i-200)/sc; z1.i = (j-200)/sc; stroke(255, 255, 255); for (int k=0; k