Week 3

by Miranda Phillips
  • Show Sketch
/** @peep sketchcode */
size(200, 200); 
int y = 20; 
for (int x = 20; x < width; x += 20) { 
  rect(x-5, x-5, 10, 10); 
}
  • Show Sketch
/** @peep sketchcode */
size(200, 200); 
for (int y = 20; y < height; y += 20) 
{ 
  for (int x = 20; x<= y; x += 20)
  { 
    rect(x-5, y-5, 10, 10); 
  } 
}
  • Show Sketch
/** @peep sketchcode */
 
size(200, 200);
beginShape();
for (int x = 5; x <=200; x++)
{
  if (x % 15 && 5)
  {
    vertex(x, 50);
  }
  else
  {
    vertex(x, x/2);
  }
}
vertex(5,200);
endShape(CLOSE);
  • Show Sketch
/** @peep sketchcode */
size(200, 200);
background(0); 
stroke(255,60); 
for (int i = 0; i < width; i++) { 
  float r = random(width/10); 
  strokeWeight(r);
  float offset = r * 5.0;
 
  //ellipseMode(RADIUS);
  fill(0);
  ellipse(i-width/5, 100, r+offset, r+offset);
}

Comments

Nobody has said anything yet.