/** Mesmerizing spirals by guru */ void setup() { size(300,300); smooth(); frameRate(25); } float a = 0; void draw() { a += 0.01; background(0); noStroke(); pushMatrix(); translate( width/2, height/2 ); rotate(a); fill(0, 255, 0, 128 ); ellipse( 0,0, 10, 10); for( int i = 0; i < 360; i += 10 ) { for( int j = 0; j < 360; j += 15 ) { ellipse( cos(radians(i + j)) * i, sin(radians(i + j)) * i, 10, 10); } } popMatrix(); pushMatrix(); translate( width/2, height/2 ); rotate( 0.8 * a ); fill(255, 255, 0, 128 ); ellipse( 0,0, 10, 10); for( int i = 0; i < 360; i += 10 ) { for( int j = 0; j < 360; j += 15 ) { ellipse(cos(radians(i + j)) * i, sin(radians(i + j)) * i, 10, 10); } } popMatrix(); }