// Curves - Jim Bumgardner size(500,500); smooth(); int ntiles = 10; int tilesize = width/ntiles; int w = tilesize; int h = tilesize; for (int gy = 0; gy < ntiles; ++gy) { for (int gx = 0; gx < ntiles; ++gx) { int x = gx*tilesize; int y = gy*tilesize; strokeWeight(1+int(random(4))); noStroke(); fill(random(255),random(255),random(255)); rect(x,y,x+w,y+h); noFill(); stroke(random(255),random(255),random(255)); if (int(random(2)) != 0) { bezier(x, y+h/2, x+w/2, y+h/2, x+w/2, y+h/2, x+w/2, y+h); bezier(x+w, y+h/2, x+w/2, y+h/2, x+w/2, y+h/2, x+w/2, y ); } else { bezier(x, y+h/2, x+w/2, y+h/2, x+w/2, y+h/2, x+w/2, y); bezier(x+w, y+h/2, x+w/2, y+h/2, x+w/2, y+h/2, x+w/2, y+h); } } } // save("curves.tiff");