//Mairead Dambruch
//Section C
//mdambruc
//Project-05
function setup() {
createCanvas(590, 500);
background("Turquoise");
}
function draw() {
var buffer = 70;
var ybuffer = 60;
for (var px = 0; px < width; px = px + buffer){
for (var py = 0; py < height; py = py + ybuffer){
toilet(px, py);
man(px, py);// for loop to create groupings of man on toilet
}
}
function toilet(px, py){
var px;
var py;
push();
translate(px, py);
fill(255);
arc(50, 50, 15, 15,0, PI, CHORD);
rect(58, 35, 8, 15);
quad(55, 63, 60, 50, 66, 50, 66, 63);
pop();
}
function man(px, py){
var px;
var py;
push();
translate(px, py);
noFill();
beginShape();
curveVertex(30, 26);
curveVertex(49, 40);
curveVertex(52, 48);
curveVertex(39, 48);
curveVertex(41, 60);
curveVertex(36, 62);
endShape();//torso
line(48, 37, 40, 45);
line(35, 40, 40, 45);
line(48, 37, 42, 32);
line(40, 60, 36, 63);
line(34, 38, 40, 41);//body
fill(0);
ellipse(40, 31, 9, 9);//head
pop();
}
}
In this project I wanted to illustrate the “Demographic of the Internet”, which is essentially people going to the bathroom using their smartphones. I really enjoyed the illustrative part of this assignment and I learned more about for loops.