
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | void setup() { size( 999 , 999 ); smooth(); frameRate( 11 ); } void draw() { background( 255 , 250 , 0 ); strokeWeight( 10 ); stroke(random( 255 ), random( 255 ), 255 ); for ( int x = 20 ; x < width; x+= 20 ) { float mx = mouseX/ 10 ; float offsetA = random(-mx, mx); float offsetB = random(-mx, mx); line(x + offsetA, 20 , x - offsetB, 200 ); } strokeWeight( 10 ); stroke(random( 100 ), random( 255 ), random( 255 )); for ( int x = 20 ; x < width; x+= 20 ) { float mx = mouseX/ 10 ; float offsetA = random(+mx, mx); float offsetB = random(+mx, mx); line(x + offsetA, 20 , x - offsetB, 990 ); } strokeWeight( 10 ); stroke(random( 150 ), random( 150 ), 150 ); for ( int x = 20 ; x > width; x+= 25 ) { float mx = mouseX/ 10 ; float offsetA = random(+mx, mx); float offsetB = random(+mx, mx); line(x + offsetA, 740 , x - offsetB, 900 ); } strokeWeight( 10 ); stroke(random( 250 ), random( 255 ), 255 ); for ( int y = 20 ; y < width; y+= 18 ) { float my = mouseY/ 10 ; float offsetA = random(+my, my); float offsetB = random(+my, my); line(y - offsetA, 740 , y + offsetB, 900 ); } } void mouseDragged(){ strokeWeight( 100 ); ellipse(mouseX, mouseY, random( 50 ), random( 90 )); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | void setup() { size( 999 , 999 ); background( 255 , 250 , 0 ); smooth(); frameRate( 11 ); } void draw() { strokeWeight( 10 ); stroke(random( 255 ), random( 255 ), 255 ); for ( int x = 20 ; x < width; x+= 20 ) { float mx = mouseX/ 10 ; float offsetA = random(-mx, mx); float offsetB = random(-mx, mx); line(x + offsetA, 20 , x - offsetB, 200 ); } strokeWeight( 10 ); stroke(random( 100 ), random( 255 ), random( 255 )); for ( int x = 20 ; x < width; x+= 20 ) { float mx = mouseX/ 10 ; float offsetA = random(+mx, mx); float offsetB = random(+mx, mx); line(x + offsetA, 20 , x - offsetB, 990 ); } strokeWeight( 10 ); stroke(random( 150 ), random( 150 ), 150 ); for ( int x = 20 ; x > width; x+= 25 ) { float mx = mouseX/ 10 ; float offsetA = random(+mx, mx); float offsetB = random(+mx, mx); line(x + offsetA, 740 , x - offsetB, 900 ); } strokeWeight( 10 ); stroke(random( 250 ), random( 255 ), 255 ); for ( int y = 20 ; y < width; y+= 18 ) { float my = mouseY/ 10 ; float offsetA = random(+my, my); float offsetB = random(+my, my); line(y - offsetA, 740 , y + offsetB, 900 ); } } void mouseDragged(){ strokeWeight( 100 ); ellipse(mouseX, mouseY, random( 50 ), random( 90 )); } |