/** This example is similar to week03_normal_2d_random, but here we position circles on the screen with their X and Y coordinates generated using a Gaussian Random Number Generator. */ // Create our RNG CustomRandom rand = new CustomRandom(); void setup() { // setup the environment size(500, 500); background(10); smooth(); colorMode(RGB, 255, 255, 255, 100); } void draw() { // fade out the screen fill(10, 10, 10, 1); rect(0, 0, width, height); // set the drawing style for our circles fill(32, 64, 128, 100); // generate 25 circles, with X and Y coordinates dictated by a Gaussian RNG for (int i = 0; i < 25; i++) { ellipse(rand.getRandom(width), rand.getRandom(height), 20, 20); } }