18



void setup(){
size(400,400);
noStroke();
smooth();
background(255);
drawCircle(200,200,180,8);

}

void drawCircle(float x, float y, int radius, int level){
float tt = 126 * level/6.0;
fill(tt,tt,10, 33);
ellipse(x,y, radius*2, radius*2);
if(level > 1){
level = level -1;
int num = int( random(0,6));
for(int i = 0; i < num; i ++){
float a = random(0, TWO_PI);
float nx = x + cos(a) * 6.0 * level;
float ny = y + sin(a) * 6.0 * level;
drawCircle(nx, ny, radius/2, level);
}
}

}

コメント