Prototyping Class
September 15, 2021

Homework 2

Playing with Processing. Replicating the yellow painting.

Characters in Yellow
void setup() {
  size(300, 600);
  background(#FACC14);
  fill(#804932, 60);
  noStroke();
  int rectWidth = width/5;
  int rectHeight = height/8;
  for( int j=0; j<8; j++ ) {
    
    for( int i=0; i<5; i++ ) {
      fill( 220+random(35), 140+random(55), 0 );
      int x = i*rectWidth;
      int y = j*rectHeight;
      int w = (int)(rectHeight*random(0.4,1.3));
      int h = (int)(rectWidth*random(0.6,1.7));
      rect( x, y, w, h);
      
      // noise overlay for rectangles
      for( int jj=x; jj<x+w; jj++ ) {
       for( int ii=y; ii<y+h; ii++) {
         fill(0,0,0,random(16));
        rect(jj, ii, 1, 1); 
       }
      }
    }  
  }
}