fractal { // Establish the mapping between complex coordinates // and display coordinates mapping { (0.05092379820800004009, 0.11894980923076950430, 0.05233017056000004164, 0.11967625846153873148) => (800, 600) } // Set up our colors - a smooth gradient from a shade of blue, to // white then back to the original shade of blue. Our gradient // spans 361 colors so that the value at 0 is the same as the // value at 360 colors { define { gradient(330) { [255 255 204] [204 153 0] [255 255 204] } } define { gradient(1000) { [204 255 204] [0 51 0] [204 255 204] } } define { gradient(4300) { [204 255 255] [0 51 51] [204 255 255] } } } // Set up our fractal formula { // Initialize variables c = current; z = current; c2 = [-0.665,0.783]; c12 = [0.662,-0.0321]; // Stopping condition, note the unusual: cos(imag(z)) > sin(real(z)) // portion - it is this part of our stopping condition that creates // the checkerboard appearance this fractal has while(mag(z)<5000&& $count<99) { // Formula for iteration x = z; y=z; s0=y; s0=s0-x; s0=s0+c2; s1=x; s1=s1-x; s2=x; s1=s1-s2; s0=s0/s1; s0=s0/y; s0=s0+c12; s0=s0+x; z=s0; } // Use color table entry corresponding to the angle that "z" // made relative to the origin when the while loop above terminated set_color(mag(z)/3+deg(z)); } }