Week 2

  • Show Sketch
/** @peep sketchcode */
size(400, 400);
background(random(255), random(255), random(255));
stroke(0); 
smooth();
// Ripples
fill(random(255), random(255), random(255));
ellipse(200, 300, 200, 100);
fill(random(255), random(255), random(255));
ellipse(200, 300, 150, 75);
fill(random(255), random(255), random(255));
ellipse(200, 300, 100, 50);
fill(random(255), random(255), random(255));
ellipse(200, 300, 50, 25);
// Triangle touches water
for(int a = 10; a <= 150; a = a+10)  {
  for(int b = 20; b <= 150; b = b+10)  {
stroke(random(255), random(255), random(255));
fill(255);
    triangle(a, 20, 200, 300, 200, 50);
triangle(380, b, 200, 300, 200, 50);
}
}
stroke(255); //cover the middle line
strokeWeight(2)
line(200, 52, 200, 298);

Last modified on 16 Mar 2016 at 5:44am