用各种颜色的点模拟颜料飞溅在画板的效果,大部分点画在中间位置,也有一部分点画在边缘位置。位置要符合正态分布。P12
void setup(){
size(1024, 768);
}
void draw(){
float x = randomGaussian();
float y = randomGaussian();
float sd = 60;
float meanx = 1024/2;
float meany = 768/2;
x = sd * x + meanx;
y = sd * y + meany;
noStroke();
fill(int(random(255)), int(random(255)), int(random(255)));
ellipse(x, y, 16, 16);
}