Skip to content

Instantly share code, notes, and snippets.

@gregberger
Created February 2, 2015 12:52
Show Gist options
  • Save gregberger/2bf86f7ee8ac81275ece to your computer and use it in GitHub Desktop.
Save gregberger/2bf86f7ee8ac81275ece to your computer and use it in GitHub Desktop.
int i, f=0;
int value=2;
int s=500;
void setup(){
size(s,s);
}
void draw() {
loadPixels();
while (++i < (s*s)) {
f=frameCount;
pixels[(int)random(i)]=i%value<<f<<16|value;
}
updatePixels();
i=0;
}
void keyPressed(){
if(key=='a') value*=2;
println(value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment