xxxxxxxxxx
44
// 1 out of 3 nonbinary and transgender youth consider home to be a gender-affirming space.
var numerator = 1;
var denominator = 3;
function setup() {
createCanvas(denominator*140, 220);
background(220);
strokeWeight(2);
fill("lightblue");
rect(0, 0, width, 100);
fill("limegreen");
rect(0, 100, width, 80);
fill("chocolate");
rect(0, 180, width, height);
outof(numerator, denominator);
}
function outof(small, large) {
for (var i = 0; i < large; i++) {
if (i < small) {
house(i * 140 + 20, 80, "pink");
} else {
house(i * 140 + 20, 80, "purple");
}
}
}
function house(x, y, col) {
fill(col);
push();
translate(x, y);
line(50, -100, 50, 150);
//rect(0, 20, 100, 80);
//triangle(-10, 20, 110, 20, 50, -40);
circle(20,0,60)
circle(80,0,60)
triangle(20,0,)
pop();
}