xxxxxxxxxx
71
function setup() {
createCanvas(400, 800);
fill(255,204,165); //skin colour
ellipse(52, 100, 10, 20); //left ear
//ellipse(53, 100, 4, 8); //ear 2nd layer
ellipse(148, 100, 10, 20); //right ear
rect(80, 150, 40, 32);//neck
ellipse(100, 100, 90, 110); //face
ellipse(28,335,22);//left hand
ellipse(172,335,22);//right hand
arc(77,128,15,18,radians(155),radians(205),OPEN);//dimple on right cheek
stroke(210,0,20); //red for mouth
strokeWeight(4); //thickness for mouth
arc(100, 93, 80, 90, radians(60), radians(120), OPEN); //mouth
stroke(0);//changing colour back to black
strokeWeight(1); //default
fill(0);//black fill
rect(57, 75, 8, 20);//left sideburn
rect(135, 75, 8, 20);//right sideburn
triangle(100, 155, 99, 153, 101, 153);//chin
arc(100, 100, 95, 115, radians(210), radians(330), CHORD);//hair
fill(255);//white fill
ellipse(80, 95, 20, 15);//left eye
ellipse(120, 95, 20, 15);//right eye
fill(0);//black
ellipse(80,95, 11,13);//left iris
ellipse(120,95, 11,13);//right iris
fill('orange');//t-shirt colour
stroke('orange');
quad(20,182,41,182,36,325,20,325);//left sleeve
quad(180,182,159,182,164,325,180,325);//right sleeve
//found quad function online in the reference, which works like triangle, i.e., just needs the co-ordinates of the 4 points
rect(40,182,120,145);//t-shirt
fill(255,204,165);//skin colour
stroke(0);
triangle(100, 100, 95, 120, 105, 120);//nose
arc(100,181, 40, 30,0, PI);//collarbone?
fill('blue');//shoe colour
stroke('blue');
ellipse(140,517,55,30);//right shoe
ellipse(60,517,55,30);//left shoe
stroke(255);
fill(255);//same colour as background
arc(140,517,56,30,radians(160),radians(200),CHORD);//cutting off the heel
arc(60,517,56,30,radians(340),radians(20),CHORD);
stroke(0);
fill(0);//pant colour
quad(43,327,101,327,90,505,43,505);//left leg
quad(157,327,99,327,110,505,157,505);//right leg
stroke('brown');
fill('brown');
quad(22,182, 27,182,157,350,157,355);
rect(157,350,23,50);
}
//let beardX = 75;
//let beardY = 125;
function draw() {
//background(220);
//print(mouseX, mouseY)
//point(beardX, beardY+1);//moustache
//point(beardX+1, beardY-1)
//beardX = beardX + 2;
//if (beardX>125){
// noLoop()
// }
}