More Dra­w­i­n­g with Loops

by Julia Spyrou
  • Show Sketch
/** @peep sketchcode */
size(200, 200); 
background (30, 23, 122);
stroke(233);
for (int y = 20; y <= height - 20; y += 10) {
  for (int x = 20; x <= width - 20; x += 10) {
    if ((x % 20) == 0) {
      line(y+5, x+5, x+5, x-5);
    } else {
      line(x+5, y-5, y-5, y+5);
    }
  } 
}

Comments

Nobody has said anything yet.