Squares

Screen Shot 2015-01-22 at 15.11.10

 

Screen Shot 2015-01-22 at 15.11.24 (1)void setup(){
frameRate(45);
size(800,400);
}

color[] c ={#2facc2,#c2f2ea,#aff5f7,#b6fbeb,#008080,#311811,#c1cdc1,#854513};
int x = 0;
int r = 0;
int w = 1;
int s = 1;

void draw(){
//background(255);
fill(255,0,0,10);
stroke(c[int(random(c.length))]);
translate( width/2 , height/2 );
rotate(r);
noFill();
rect(0,0,w,w);

if (frameCount < 50){
stroke(255,0,0);
}

r=((r+2)%300);
w=r+2;
s=(s+2)%255;

if (mousePressed){
saveFrame(“rotatingsquares-######.jpg”);
}
}

squares

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