Bubble Pop

비누방울이 터지는 것을 표현해 보았습니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
int min;
int max;
void setup() {
size(320, 180);
frameRate(8);
min = 0;
max = 100;
}
void draw() {
// clear slowly
noStroke();
colorMode(RGB);
fill(color(255, 255, 255, 127));
rect(0, 0, width, height);
// draw circle
colorMode(HSB);
fill(random(255), 255, 255);
float diam = random(min, max);
ellipse(random(width), random(height), diam, diam);
}
Share Comments