float centerX;
float centerY;
float startAngle;
float endAngle;
float currentAngle;
float colorR;
float colorG;
float colorB;
float radious;
float ANGLE_STEP = PI / 32;
float MAX_RADIOUS = 200;
float MIN_RADIOUS = 50;
void setup(){
size(500, 500);
smooth();
frameRate(30);
noStroke();
background(255);
setNewCircle();
}
void draw(){
currentAngle += PI / 128.0;
fill(colorR, colorG, colorB);
arc(centerX, centerY, radious * 2.0, radious * 2.0, startAngle, currentAngle);
if(currentAngle >= endAngle){
setNewCircle();
}
}
void setNewCircle(){
centerX = random(width);
centerY = random(height);
startAngle = random(2.0 * PI);
endAngle = startAngle + 2.0 * PI;
currentAngle = startAngle;
radious = random(MAX_RADIOUS - MIN_RADIOUS) + MIN_RADIOUS;
colorR = random(255);
colorG = random(255);
colorB = random(255);
}