Created
June 23, 2014 00:33
-
-
Save KentaKomai/021c6c28ca3c724b2937 to your computer and use it in GitHub Desktop.
rotate_center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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