// stardust // // Scott "Jerry" Lawrence // http://www.cis.rit.edu/~jerry/Software/p5 // // setup - initialize stuff void setup() { size( 300, 300 ); background( 0 ); noFill(); ellipseMode( CENTER_DIAMETER ); stroke( 255 ); smooth(); } void loop() { if( mousePressed ) { int w = 6 + (int) random( 100 ); int x = mouseX; // - 10 + (int) random( 10 ); int y = mouseY; // - 10 + (int) random( 10 ); int d = (int) random( w ); int c = 1 + (int) random( 7 ); stroke( (c&4)*255, (c&2)*255, (c&1)*255 ); strokeWeight( w ); ellipse( x, y, d, d ); } if( keyPressed && key == ' ' ) background( 0 ); if( keyPressed && key == 'G' ) saveFrame(); }