/** * Gumowski-Mira attractor applet by Thor Frølich.
*
* Hold mouse button and move mouse to adjust variables.
* Release mouse button to render attractor in high quality. */ gumowskiMira gm; boolean stop; int stepCounter; void setup() { size(640, 640); noFill(); smooth(); colorMode(HSB, 255); gm = new gumowskiMira(); gm.reparam(); } void draw() { if (!stop) { stepCounter++; if (stepCounter > 32000) { stop = true; return; } gm.incrementalupdate(); } image(gm.pi, 0, 0, width, height); } void mouseDragged() { noLoop(); stop = true; gm.reparam(); redraw(); } void mouseReleased() { loop(); stop = false; stepCounter = 0; gm.updateloop(); }