5 iterations

screen-shot-2017-03-01-at-10-49-28-pm

int brickWidth = 10;
int brickHeight = 3;
int cols = 20;
int rows = 20;
int columnOffset = 20;
int rowOffset = 20;
void setup() {
size(800, 800);
noStroke();
background(255 ,218, 185);
smooth();
fill(241,108,156);
noLoop();
}

void draw() {
translate(30, 30);
for (int i=0; i<cols; i++) {
pushMatrix();
translate(i * columnOffset, 0);
float r = random(-QUARTER_PI, QUARTER_PI);
int dir = 1;
for (int j=0; j<rows; j++) {
pushMatrix();
translate(0, rowOffset * j);
rotate(r);
rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
popMatrix();

if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
}
popMatrix();
}
}

Screen Shot 2017-03-01 at 10.53.09 PM.png

int brickWidth = 10;
int brickHeight = 3;
int cols = 20;
int rows = 20;
int columnOffset = 20;
int rowOffset = 20;
void setup() {
size(800, 800);
noStroke();
background( 94, 94, 94);
smooth();
fill(72, 229, 194);
noLoop();
}

void draw() {
translate(30, 30);
for (int i=0; i<cols; i++) {
pushMatrix();
translate(i * columnOffset, 0);
float r = random(-QUARTER_PI, QUARTER_PI);
int dir = 1;
for (int j=0; j<rows; j++) {
pushMatrix();
translate(0, rowOffset * j);
rotate(r);
rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
popMatrix();

if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
}
popMatrix();
}
}

Screen Shot 2017-03-01 at 10.55.52 PM.png

int brickWidth = 10;
int brickHeight = 3;
int cols = 20;
int rows = 20;
int columnOffset = 20;
int rowOffset = 20;
void setup() {
size(800, 800);
noStroke();
background( 206, 181, 167);
smooth();
fill( 173, 170, 191);
noLoop();
}

void draw() {
translate(30, 30);
for (int i=0; i<cols; i++) {
pushMatrix();
translate(i * columnOffset, 0);
float r = random(-QUARTER_PI, QUARTER_PI);
int dir = 1;
for (int j=0; j<rows; j++) {
pushMatrix();
translate(0, rowOffset * j);
rotate(r);
rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
popMatrix();

if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
}
popMatrix();
}
}

Screen Shot 2017-03-01 at 10.58.32 PM.png

int brickWidth = 10;
int brickHeight = 3;
int cols = 20;
int rows = 20;
int columnOffset = 20;
int rowOffset = 20;
void setup() {
size(800, 800);
noStroke();
background( 240, 58, 71);
smooth();
fill( 39, 111, 191);
noLoop();
}

void draw() {
translate(30, 30);
for (int i=0; i<cols; i++) {
pushMatrix();
translate(i * columnOffset, 0);
float r = random(-QUARTER_PI, QUARTER_PI);
int dir = 1;
for (int j=0; j<rows; j++) {
pushMatrix();
translate(0, rowOffset * j);
rotate(r);
rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
popMatrix();

if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
}
popMatrix();
}
}

screen-shot-2017-03-01-at-11-01-02-pm

int brickWidth = 10;
int brickHeight = 3;
int cols = 20;
int rows = 20;
int columnOffset = 20;
int rowOffset = 20;
void setup() {
size(800, 800);
noStroke();
background( 255, 0, 127);
smooth();
fill(0, 79, 255);
noLoop();
}

void draw() {
translate(30, 30);
for (int i=0; i<cols; i++) {
pushMatrix();
translate(i * columnOffset, 0);
float r = random(-QUARTER_PI, QUARTER_PI);
int dir = 1;
for (int j=0; j<rows; j++) {
pushMatrix();
translate(0, rowOffset * j);
rotate(r);
rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
popMatrix();

if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
}
popMatrix();
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s