%%processing
void setup() {
size(500, 500);
}
void drawTree(float x, float y, float scale) {
fill(128, 128, 0);
stroke(0);
rect(x - scale * 25, y,
scale * 25, scale * 100);
fill(0, 128, 128);
float diff = 100 * scale;
float offset = scale * 10 + random(2);
ellipse(x, y, diff, diff);
ellipse(x + offset, y - offset,
diff, diff);
ellipse(x - offset, y - offset,
diff, diff);
}
void drawCloud(float x, float y, float scale) {
fill(255, 255, 255, 200);
stroke(255, 255, 255, 200);
float height = scale * 50 + random(5);
float width = scale * 100 + random(2);
ellipse(x, y, scale * 100, height);
ellipse(x + 25 * scale, y - 25 * scale,
width, height);
ellipse(x - 20 * scale, y - 25 * scale,
width, height);
noStroke();
}
void draw() {
fill(0, 0, 255);
rect(0, 0, 500, 250);
fill(0, 255, 0);
rect(0, 250, 500, 500);
drawCloud(0, 100, 2.0);
drawCloud(300, 150, 2.0);
drawTree(175, 250, 0.25);
drawTree(220, 250, 0.25);
drawTree(150, 250, 0.5);
drawTree(250, 250, 0.5);
drawTree(50, 300, 1.5);
drawTree(350, 300, 1.5);
}