Skip to content

Instantly share code, notes, and snippets.

@KentaKomai
Created June 23, 2014 00:33
Show Gist options
  • Save KentaKomai/021c6c28ca3c724b2937 to your computer and use it in GitHub Desktop.
Save KentaKomai/021c6c28ca3c724b2937 to your computer and use it in GitHub Desktop.
rotate_center
int counter;
void setup(){
size(900, 900);
//frameRate(10);
counter = 0;
}
void draw(){
background(255);
for(int i=0; i<300; i++){
pushMatrix();
translate(width/2, height/2);
rotate( radians( map(counter, 1, 10, 0, 360) ) );
rectMode(CENTER);
noStroke();
fill(random(100), random(100,255), random(100,255), 90);
rect(0,0,400,400);
rectMode(CORNER);
popMatrix();
counter++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment