Rep­e­a­t­e­d Grid

by Matthew Chensee
  • Show Sketch
/** @peep sketchcode **/
 
void setup() {
  size(200, 200);
  background(204);
  translate(width/2, height/2);
  scale(1.0/3.0);
  for (int i = 0; i < 360/10; i++) {
    grid();
    rotate(radians(360.0/i));
  }
}
 
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.