/* built with Studio Sketchpad: * http://sketchpad.cc * * observe the evolution of this sketch: * http://studio.sketchpad.cc/sp/pad/view/ro.IkCTTutmZlZ/rev.4 * * authors: * * Hassan Haghayeghi * license (unless otherwise specified): * creative commons attribution-share alike 3.0 license. * http://creativecommons.org/licenses/by-sa/3.0/ */ float i = 0; float x = 50; float co = 200; void setup() { size(500, 500); background(255); colorMode(HSB); smooth(); noStroke(); } void rotat(float i, float x) { fill(255); rotate(i); ellipse(x, x, 5, 5); } void line_ellipse(float i) { int x = 10; int j = 1; while ( j < 15) { rotat(i, x); x = x + 10; j = j + 1; } } void group_line(int z) { int j = 1; while ( j < 6 ) { line_ellipse(z*x*i); j = j + 1; } } void draw() { fill(co, co, co, 150); rect(0, 0, width, height); translate(width/2, height/2); int j = 1; while ( j < 4) { group_line(-1); group_line(1); j = j + 1; } // ellipse(i*10, 50, 10, 10); i = map(sin(x)/100, -1, 1, -1, 1) + map(cos(x)/100, -1, 1, -1, 1); x = x + 0.0015; } void mousePressed() { if (mousePressed == true) { co = (mouseX + mouseY)/map(noise(2), -1, 1, 2, 4); } }