String gridName = "Waffles"; float rand = 255; float r = random(256); float a = 0.0; float inc = TWO_PI/5.0; int x = 0; void setup() { size(700, 700); stroke(255, 0, 0); frameRate(30); println(" The inc = " + inc); for (int i=0; i < height; i+=20) { fill(0, 255, 0); rect(0, i, width, 10); fill(160, 10, 200); rect(i, 0, 10, height); } stroke(200, 100, 50); for (int b = 5; b < 700; b += 5) { if (b < 35) { line( 30, r, 700, b ); } else { line( 20, b, 700, r ); } } strokeWeight(7); stroke(0, 255, 255); for (int w=0; w< 700; w+=10) { line(w, 300, w, 300+sin(a)*200.0); println(" The angle = " + a + "The sin = " + sin(a)); a = a + inc; } } void draw() { for (int s = 0; s < 700; s += 20) { for (int j = 0; j < 700; j += 20) { noStroke(); fill(random(255), random(255), random(255), random(255)); ellipse( s, j, 10, 10 ); println(gridName + ", now has a fill value of " + random(255), random(255), random(255)); if (mousePressed) { ellipse(s, j, 30, 30); } } } strokeWeight(1); stroke(255); fill(random(255)); rect(mouseX, mouseY, 50, 50, random(255)); if (mousePressed) { strokeWeight(1); stroke(255); fill(random(255), random(255), random(255)); rect(mouseX, mouseY, 50, 50, random(255)); } if (x < 500) { line(x, 0, x, 100); x = x + 3; } else { noLoop(); exit(); } saveFrame("line-####.png"); }