Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created March 20, 2011 16:14
Show Gist options
  • Save qingfeng/878417 to your computer and use it in GitHub Desktop.
Save qingfeng/878417 to your computer and use it in GitHub Desktop.
rect random by Processing
void setup(){
size(800,600);
background(255);
noStroke();
colorMode(RGB);
frameRate(15);
}
void draw() {
color c = color(random(255),random(255),random(255));
fill(c);
translate(random(width-50), random(height-50));
rotate(PI/random(5));
rect(random(width/4),random(height/4),random(width/4),random(height/4));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment