float theta;
float a = 4;
void setup() {
size(1440, 850);
background(255);
frameRate(4);
noStroke();
drawdivision(0, 0, 180, height);
}
void draw() {
}
void keyPressed() {
background(255);
drawdivision(0, 0, 180, height);
}
void drawdivision(int x, int y, int w, int h) {
float division = random(0, 1);
int d = int(h*division);
if (x<width) {
fill(240);
rect(x, y, w, d);
fill(80);
rect(x, y + d, w, h- d);
x = x+ w;
drawdivision(x, y, w, d);
drawdivision(x, y + d, w, h- d);
}
}
댓글
댓글 쓰기