xxxxxxxxxx
/*------------------------
Project 1- Squares
Created 3/17
Kali Johnston
SP 2017
knjohnston0704@gmail.com
---------------------------*/
void setup(){
size(2000,2000);
background(255);
noFill(); //doesn't fill objects
noLoop(); //won't animate the void draw
}
void draw(){
//top layer- for loop causes squares to go everywhere
for (int i=0; i<2000; i+=50){
for(int j=0; j<2000; j+=50){
rotate(random(-0.1,0.5)); //random rotation
stroke(0,random(139,255)); //random stroke color from black to medium grey
strokeWeight(random(1,10)); //random stroke weight
rect(i,j,80,80,20); //square 1 forms shape with square 2
rect(i+50,j+50,80,80,20); //square 2
}
}
//background layer
for (int i=0; i<2000; i+=50){
for(int j=0; j<2000; j+=50){
rotate(random(-0.1,0.5));
stroke(0,random(0,138)); //random stroke color from medium grey to white
strokeWeight(random(1,10));
rect(i,j,30,30,20);
rect(i+50,j+50,30,30,20);
}
}
}