Ex_00_04_Gaussian

gaussian distribution

import java.util.Random;
Random generator;

void setup(){
  size(649,360);
  background(255);
  generator = new Random();
}

void draw(){
  float num = (float) generator.nextGaussian();
  // next Gaussian return ""double""
  
  float sd = 60;
  float mean = 320;
  
  float x = sd*num + mean;
  
  noStroke();
  fill(0,7);
  
  ellipse(x,180,20,20);
}