Last active
January 23, 2017 05:15
-
-
Save venetucci/879bfe878bf6d5735a7a6d0ca738aa5a to your computer and use it in GitHub Desktop.
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
import java.util.Random; | |
Random generator; | |
void setup() { | |
size(1120,1200); | |
generator = new Random(); | |
background(50); | |
} | |
void draw() { | |
float numX = (float) generator.nextGaussian(); | |
float numY = (float) generator.nextGaussian(); | |
float sd = 70; | |
float mean = 320; | |
float x = sd * numX + mean; | |
float y = sd * numY + mean; | |
noStroke(); | |
fill(250, 10); | |
ellipse(x, y, 900, 900); | |
} |
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
import java.util.Random; | |
Random generator; | |
void setup() { | |
size(1120,1200); | |
generator = new Random(); | |
background(250); | |
} | |
void draw() { | |
float numX = (float) generator.nextGaussian(); | |
float numY = (float) generator.nextGaussian(); | |
float sd = 70; | |
float mean = 320; | |
float x = sd * numX + mean; | |
float y = sd * numY + mean; | |
if (random(1) > 0.9) { | |
noStroke(); | |
fill(random(160), random(200), random(2), 10); | |
ellipse(x, y, 900, 900); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment