ianhi_NatureOfCode/Introduction/paintSplatter/paintSplatter.pde

import java.util.*; 
Random generator;


float mean = 320;
float sd = mean/4;

float color_sd = 50;
float color_mean = 50;
  
void setup(){
  size(640,640);
  generator = new Random();
  background(255);
  fill(0,60);


}

void draw() {
  float num_x = (float) generator.nextGaussian();
  float num_y = (float) generator.nextGaussian();
  float num_col = (float) generator.nextGaussian();
  float rad_x = (float) generator.nextGaussian();
  float rad_y = (float) generator.nextGaussian();
  rad_x = rad_x*5+16;
  rad_y = rad_y*5+16;  
  float x = sd*num_x +mean;
  float y = sd*num_y +mean;
  
  float col_val = color_sd*num_col + color_mean;
  noStroke();
  fill(randRGB(),randRGB(),randRGB(),80);
  //ellipse(x,y,x/width*16,y/width*16);
  ellipse(x,y,rad_x,rad_y);
}
float randRGB(){
  float num=(float) generator.nextGaussian();
  return num*color_sd+color_mean;
}
void mousePressed(){
  noLoop();
}