Tut­o­r­i­a­l 6

by Matthew Chensee
  • Show Code
/** @peep sketch */
 
size(500, 500);
noFill();
strokeWeight(1.2);
for (int y = 20; y <= height-20; y += 10) {
  for (int x = 20; x <= width-20; x += 10) {
    if (random(1) < 0.5) {
      bezier(x, y-5, x, y-2, x+2, y, x+5,y); 
      bezier(x-5, y, x-2, y, x, y+2, x, y+5);
    }
    else {
      bezier(x, y-5, x, y-2, x-2, y, x-5,y); 
      bezier(x+5, y, x+2, y, x, y+2, x, y+5);
    }
  }
}

Comments

Nobody has said anything yet.