Created
September 23, 2015 08:10
-
-
Save federico-pepe/4fdfd8b48c2e8ed88296 to your computer and use it in GitHub Desktop.
Utilizzo della funzione random() - Esempio 2
This file contains hidden or 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
| /* | |
| * Utilizzo della funzione random() - Esempio: 2 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| float radius; | |
| void setup() { | |
| size(700, 500); | |
| background(255); | |
| } | |
| void draw() { | |
| radius = random(10, 50); | |
| ellipse(random(width), random(height), radius, radius); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment