Recreate Artwork

In this artwork, I remove the inner complicated lines and then put random colors into squares.

originalArtwork

 

The first image is the original design, the second one is the recreated one. I set up 8 rows and 8 columns in this image, so I can get 64 squares in total in this work. Inside each square, there is a random sized square which is smaller than the original one. The last thing is to set random number for the colour of each square. You can see the result above.

Here is the code:

int cols = 8;
int rows = 8;
float offsetX;
float offsetY;
int sqSize= 100;
int sizeDifference = 3;

void setup() {
  size(800, 800);
  rectMode(CENTER);
  strokeWeight(4);
  fill(200);

  //for every row...
  for (int r = 1; r<rows; r++) {
    //for every column...
    for (int c = 1; c<cols; c++) {
      //choose a new offset
     
      rect(c*sqSize, r*sqSize, sqSize, sqSize);      
      for (int i=1; i<random(40,100); i++) {

        rect((c*sqSize)+(i*offsetX), (r*sqSize)+(i*offsetY), sqSize - (i*sizeDifference), sqSize - (i*sizeDifference));
      fill(random(0,200),random(0,200),random(0,200));  
      for (int l=1; l<5; l+=2) {;} //needed for intense color change
      }

    }
  }
}

void draw() {
}

 

Leave a Reply