fractal { // Establish the mapping between complex coordinates // and display coordinates mapping { (-0.10105470163733754063, 0.14115032714089981170, 0.53444305162959770961, 0.79359468716161996049) => (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(330) { [204 255 204] [0 51 0] [204 255 204] } } define { gradient(330) { [204 255 255] [0 51 51] [204 255 255] } } } // Set up our fractal formula { // Initialize variables c = current; z = current; c0 = [-0.15, 0.18]; c3 = [-0.13,0.49]; c5 = [-0.99,-0.0052]; c7 = [0.35,0.44]; c8 = [-0.14,0.69]; // 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)<8 && $count<990) { // Formula for iteration x = z; y=z; s0=c0; s0=s0/x; s0=s0*c3; s0=s0/c5; s0=s0+c7; s1=c8; s1=s1-y; s0=s0+s1; 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($count+80); } }