xxxxxxxxxx
127
let centerX;
let centerY;
function setup() {
createCanvas(500, 500);
}
function draw() {
background(99, 208, 255);
centerX = width / 2;
centerY = height / 2;
//hair
fill(51, 41, 22);
rect(centerX - 100, centerY - 70, 200, 200);
arc(centerX, centerY - 70, 200, 150, 0, 2 * PI, OPEN);
stroke(240, 225, 180);
strokeWeight(3.0);
line(centerX, centerY - 60, centerX, centerY - 143);
strokeWeight(0);
//face
stroke(0);
fill(240, 225, 180);
ellipse(centerX, centerY, centerX - 70, centerY - 50);
//mouth
fill(255);
stroke(186, 87, 87);
strokeWeight(4.0);
arc(centerX, centerY + 50, 40, 30, 0, PI, CHORD);
strokeWeight(1);
//left ear
noStroke();
fill(240, 225, 180);
ellipse(centerX - 90, centerY, 25, 25);
//right ear
fill(240, 225, 180);
ellipse(centerX + 90, centerY, 25, 25);
//left eye
stroke(0);
fill(255);
ellipse(centerX - 35, centerY - 7, 17, 15);
fill(0);
ellipse(centerX - 39, centerY - 7, 12, 15);
noFill();
//right eye
fill(255);
ellipse(centerX + 35, centerY - 7, 17, 15);
fill(0);
ellipse(centerX + 31, centerY - 7, 12, 15);
noFill();
//right brow
stroke(51, 41, 22)
strokeWeight(3.0);
arc(centerX+35, centerY-27, 35, 6, PI,0 );
//left brow
stroke(51, 41, 22)
strokeWeight(3.0);
arc(centerX-35, centerY-27, 35, 6, PI,0 );
beginShape();
fill(51, 25, 0);
vertex(centerX - 50, centerY - 30);
endShape();
//nose
noFill();
stroke(0);
bezier(
centerX,
centerY,
centerX,
centerY + 10,
centerX - 20,
centerY + 25,
centerX,
centerY + 25
);
//neck
noStroke();
fill(centerX - 10, centerY - 25, 180);
rect(centerX - 15, centerY + 90, 30, 50);
//body
stroke(0)
strokeWeight(1.0);
fill(3, 135, 62);
rect(135, 370, 230, 230, 75);
//hands
stroke(0);
line(centerX-70, centerY+170, centerX-70, centerY+250);
strokeWeight(2.0);
line(centerX+70, centerY+170, centerX+70, centerY+250)
// collar
noFill();
stroke(0);
strokeWeight(1.0);
strokeJoin(ROUND);
beginShape();
vertex(234, 370);
vertex(249, 400);
vertex(265, 370);
endShape();
fill(240, 225, 180);
noStroke();
beginShape();
vertex(235, 370);
vertex(249, 400);
vertex(265, 370);
endShape();
}