Week 5

by sherly chen
  • Show Code
/** @peep sketch */
void setup() {
  size(200, 200);
  background(204);
  translate(-width/3, -height/3);
  grid();
}
 
void grid() {
  stroke(0, 32);
  fill(255, 64);
  rect(0, 0, width, height);
  for (int x = 0; x <= width; x += 10) { line(x, 0, x, height); }
  for (int y = 0; y <= height; y += 10) { line(0, y, width, y); }
  stroke(255, 0, 0, 128);
  line(10, 10, 30, 10);
  line(25, 15, 30, 10);
  line(25, 5, 30, 10);
  stroke(0, 0, 255, 128);
  line(10, 10, 10, 30);
  line(15, 25, 10, 30);
  line( 5, 25, 10, 30);
}

Comments

Nobody has said anything yet.