xxxxxxxxxx
98
function setup() {
createCanvas(400, 400);
}
function draw() {
background(79);
noStroke();
fill(250,243,235);//the color of skin
ellipse(200,165,154,173);//the face
quad(120,174,126,212,104,195,107,176);
quad(275,174,287,176,291,195,269,212);//the ears
rect(179,245,43,45);//the neck
fill(0);
noStroke();
quad(177,251,177,285,165,285,165,245);
quad(164,245,164,285,149,285,149,235);
quad(148,234,148,285,136,285,143,227);//the left side of hair behind
quad(224,250,224,285,236,285,236,245);
quad(237,244,237,285,250,285,250,235);
quad(251,234,251,285,268,285,259,221);//the right side of hair behind
noFill();
strokeWeight(6);
stroke(0);
curve(350,50,216,76,138,222,300,220);//the profile of left front hair
curve(50,50,210,84,258,212,60,400);//the profile of right front hair
fill(0);
quad(216,76,197,95,149,95,177,74);
quad(197,95,177,119,128,119,149,95);
quad(177,119,160,147,120,146,128,119);
quad(158,147,146,175,120,175,121,147);
quad(145,175,136,203,125,203,120,175);
quad(136,202,135,222,131,222,126,202);
quad(218,76,234,76,243,87,216,87);
quad(216,87,243,87,253,97,225,97);
quad(225,97,253,97,268,115,243,115);
quad(243,115,268,115,281,142,264,142);
quad(264,142,281,142,283,170,266,170);
quad(266,170,283,170,281,197,268,197);
quad(268,197,279,201,268,212,260,212);
quad(288,137,298,139,319,170,290,161);//use quad to fill the hair
noFill();
stroke(189);
strokeWeight(4);
circle(122,215,20);
circle(278,215,20);//the ear rings
strokeWeight(2);
for(let i=174;i>148;i-=4){
line(i,144,i+3,152);
}
for(let i=226;i<252;i+=4){
line(i,144,i-3,152);
}//draw the eyebrow
fill(0);
noStroke();
circle(164,172,20);
circle(236,172,20);//draw the eyes
fill(240,220,197);
triangle(217,251,182,251,182,269);//the shadow on the neck
triangle(200,185,200,202,191,202);//the shadow of nose
noStroke();
fill(255);//the color of clothes
rect(115,290,170,80);//the colothes above the neck
quad(115,290,115,370,69,371,69,326);
quad(285,290,285,370,329,371,329,326);
fill(224,32,32);
rect(250,330,15,4);
fill(250,100,0);
rect(250,334,15,4);
fill(247,181,0);
rect(250,338,15,4);
fill(109,212,0);
rect(250,342,15,4);
fill(98,54,255);
rect(250,346,15,4);//the decoration of the hoodie
fill(255);
quad(138,237,136,248,69,248,95,222);
quad(69,248,78,275,133,275,136,248);
quad(133,275,132,285,87,285,78,275);
triangle(113,285,100,295,87,285);//the left side of hoodie hat
quad(264,238,306,223,333,250,265,250);
quad(265,250,333,250,324,275,269,275);
quad(269,275,324,275,316,285,270,285);
triangle(291,285,316,285,305,296);//the right side of hoodie hat
fill(216);
quad(131,242,125,277,92,246,100,235);
quad(272,245,304,234,311,245,277,275);//the shadow of hoodie hat
fill(250,243,235);//the color of hidden neck
triangle(179,290,223,290,200,310);//the hidden neck
}