xxxxxxxxxx
// future pangs...
// future = skyscrapers, construction
// pangs = overcrowding
function setup() {
createCanvas(windowWidth, windowHeight);
background(85,79,89);
}
function building(x, y) {
var alpha = random(100,255);
if (random() < 0.1) {
fill(242,230,206, alpha);
} else if (random() < 0.3) {
fill(217,163,163, alpha);
} else {
fill(128,105,140, alpha); // most chance of this building colour
}
var numSquaresInBuilding = random(20);
var blockWidth = blockHeight = 20;
for (i = 0; i < numSquaresInBuilding; i++) {
rect(x+sin(millis())*(2+random(5)), y+i*(2+random(5)), blockWidth, blockHeight);
}
}
function person(x, y) {
fill(191,124,169, random(100,255));
ellipse(x, y, random(10,20), random(10,20));
}
function draw() {
building(random(windowWidth), random(windowHeight));
person(random(windowWidth), random(windowHeight));
}