Skip to content

Instantly share code, notes, and snippets.

Created Aug 23, 2016
Embed
What would you like to do?
squares >:)
void setup(){
size(600,600,P2D);
rectMode(CENTER);
noFill();
frameRate(30);
}
float t;
void squares(){
for(int i=0; i<8; i++){
pushMatrix();
translate(width/2,height/2);
rotate(QUARTER_PI*i);
rect(180*cos(PI*t),0,180,180);
popMatrix();
}
}
void draw(){
t = .0125*frameCount;
background(0);
stroke(240);
strokeWeight(10);
squares();
stroke(0);
strokeWeight(6);
squares();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment