void setup() { size(700,200); background(192,64,0); stroke(0); } void draw() { stroke(220,220,220,20); strokeWeight(1); fill(220,200,120,20); float sigma=width/10; float mu = width/2; // Box-Muller method for generating normal distributed // numbers X and Y: float U = random(1); float V = random(1); float X = sqrt(-2*log(U))*cos(2*PI*V); float Y = sqrt(-2*log(U))*sin(2*PI*V); ellipse(X*sigma+mu,random(height),20,20); ellipse(Y*sigma+mu,random(height),20,20); stroke(0,0,0); strokeWeight(0.5); line(X*sigma+mu,height/2-10,X*sigma+mu,height/2+50); line(Y*sigma+mu,height/2-10,Y*sigma+mu,height/2+50); // the Gauss curve beginShape(); stroke(0,0,0,2); strokeWeight(10); noFill(); float x,y; for (x=0;x