this is my project 1
function setup() {
createCanvas(350, 405);
background(224, 179, 179);
text("Xinran Yu, Section A");
}
function draw() {
strokeWeight(0);
//hair
if(mouseX < (width/2)) {
fill(79, 62, 53);
ellipse(170, 190, 200, 200);
rect(70, 200, 200, 250)
} else if(mouseX > (width/2)) {
fill(35, 35, 35);
ellipse(170, 190, 200, 200);
rect(70, 200, 200, 250);
}
//ear
fill(210, 159, 137);
ellipse(95, 220, 20, 40);
ellipse(245, 220, 20, 40);
fill(245, 208, 155);
rect(91, 232, 5, 40);
rect(245, 232, 5, 40);
//neck
fill(177, 156, 144);
triangle(135, 280, 205, 280, 170, 370);
//face
fill(240, 221, 210);
ellipse(170, 210, 150, 170);
//eyes
fill(0)
ellipse(140, 200, 20, 30);
ellipse(200, 200, 20, 30);
fill(255, 255, 255, 150);
ellipse(136, 203, 10, 15);
ellipse(196, 203, 10, 15);
//clothes
fill(85, 112, 142);
rect(95, 330, 150, 200);
ellipse(95, 405, 159, 150);
ellipse(255, 405, 150, 150);
fill(122, 163, 208);
triangle(95, 330, 245, 330, 170, 380);
//eyebrows
strokeWeight(2);
noFill();
beginShape();
curveVertex(125, 177);
curveVertex(125, 177);
curveVertex(135, 175);
curveVertex(145, 175);
curveVertex(153, 177);
curveVertex(153, 177);
endShape();
strokeWeight(2);
noFill();
beginShape();
curveVertex(185, 177);
curveVertex(185, 177);
curveVertex(195, 175);
curveVertex(205, 175);
curveVertex(213, 177);
curveVertex(213, 177);
endShape();
//nose
strokeWeight(0);
fill(210, 159, 137);
triangle(160, 225, 180, 225, 170, 250);
//mouth
strokeWeight(3);
noFill();
beginShape();
curveVertex(150, 260);
curveVertex(150, 260);
curveVertex(165, 270);
curveVertex(175, 270);
curveVertex(190, 260);
curveVertex(190, 260);
endShape();
}