Created
October 11, 2017 11:04
-
-
Save KokoDoko/141b4c6dd7de5caf6de4a2114731f581 to your computer and use it in GitHub Desktop.
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
void setup(){ | |
size(800,600); | |
noStroke(); | |
} | |
void draw(){ | |
} | |
void mouseDragged(){ | |
drawCircle(); | |
} | |
void drawCircle(){ | |
float x = getRandomNumber(mouseX-30, mouseX+30); | |
float y = getRandomNumber(mouseY-30, mouseY+30); | |
float r = getRandomNumber(0,120); | |
float red = getRandomNumber(0,255); | |
float green = getRandomNumber(0,255); | |
float blue = getRandomNumber(0,255); | |
fill(red, green, blue); | |
ellipse(x, y, r, r); | |
} | |
float getRandomNumber(int min, int max){ | |
return random(min, max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment