//Hayoon Choi
//hayoonc
//section C
function setup() {
createCanvas(600, 600);
}
function draw() {
background(232, 241, 255);
//vertical lines
for (var x = 0; x < width - 10; x += 35){
stroke(255);
strokeWeight(5);
line(x, 0, x, height);
}
//drawing dogs
for (var x = 100; x < width; x += 200){
for (var y = 70; y < height; y += 145){
dog(x, y, 0.75);
}
}
//drawing reflected dogs (2nd and 4th columns)
for (var x = 200; x < width - 190; x += 200){
for (var y = 140; y < height - 140; y += 145){
dog(x, y, 0.7, -1);
}
}
}
function dog(x, y, s1 = 1, s2 = 1){
push();
fill(216, 154, 80);
translate(x, y);
scale(s1);
scale(s2, 1); //reflecting dog
//ears
strokeWeight(5);
stroke(216, 154, 80)
strokeJoin(ROUND);
triangle(18, -35, 19, -19, 4, -23);
triangle(-12, -39, -5, -24, -20, -22);
stroke(200);
fill(200);
triangle(15, -30, 19, -19, 4, -23);
triangle(-12, -33, -5, -24, -20, -22);
//fur
stroke(216, 154, 80)
strokeWeight(1);
fill(216, 154, 80);
beginShape();
curveVertex(27, -2);
curveVertex(27, -2);
curveVertex(42, 5);
curveVertex(37, 5);
curveVertex(44,12);
curveVertex(32, 12);
curveVertex(29, 6);
endShape();
beginShape();
curveVertex(44, 34);
curveVertex(44, 34);
curveVertex(47, 44);
curveVertex(42, 42);
curveVertex(42, 56);
curveVertex(37, 52);
curveVertex(37, 52);
endShape();
//body
noStroke();
ellipse(0, 0, 64, 59);
ellipse(11, 31, 68, 72);
ellipse(-1, 49, 80, 44);
//legs
ellipse(-11, 69, 12, 24);
ellipse(-38, 59, 12, 24);
//mouth
strokeWeight(0.5);
stroke(0);
fill(200);
arc(-10, 6, 15, 5, QUARTER_PI, PI + QUARTER_PI, OPEN)
arc(-10, 0, 25, 10, QUARTER_PI, PI + QUARTER_PI, OPEN)
//eyes
fill(255);
ellipse(3, -7, 10, 5)
ellipse(-20, -7, 10, 5)
fill(0);
ellipse(3.5, -7, 7, 4)
ellipse(-19.5, -7, 7, 4)
//nose
ellipse(-17, 0, 5, 3);
pop();
}
I wanted draw my dog and show the face she makes whenever I call her name. She tries very hard to ignore me and looks at the other direction.