Skip to content

Instantly share code, notes, and snippets.

@Usse
Last active December 31, 2015 02:19
Show Gist options
  • Save Usse/7920347 to your computer and use it in GitHub Desktop.
Save Usse/7920347 to your computer and use it in GitHub Desktop.
Processing Random colour and dimension
void setup() {
size(480,120);
}
void draw() {
int[] colours = {255, 100, 10};
if(mousePressed) {
fill(0);
}else {
//fill(255);
int index = int(random(colours.length));
fill(colours[index]);
}
float random = random(50) + 30;
ellipse(mouseX, mouseY,random,random);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment