function setup() {
createCanvas(600, 600);
}
function draw() {
background(255, 214, 89);
//shirt
//dark blue
fill(8,27,64);
strokeWeight(0);
rect(150, 450, 300, 200, 50);
//neck
fill(237,175,130);
triangle(250,450,350,450,300,500);
rect(250,425,100,25);
//collar
fill(36,45,64);
triangle(300,500,250,430,230,450);
triangle(300,500,350,430,370,450);
//hair
fill(97,62,39);
ellipse(300,150,300,200);
ellipse(150,205,50,150);
ellipse(450,205,50,150);
//head
fill(237,186,149);
triangle(300,450,150,400,450,400);
rect(150,150,300,250);
ellipse(150,295,50,80);
ellipse(450,295,59,80);
//more hair
fill(97,62,39);
ellipse(315,150,270,75);
triangle(150,150,180,150,150,170);
//eyebrows
rect(200,215,60,15);
rect(342,215,60,15);
//nose
fill(237,175,130);
triangle(300,250,280,340,320,340);
ellipse(300,335,40,40);
//eyes
fill(250);
ellipse(230, 280, 80, 80);
ellipse(370,280,80,80);
fill(0);
ellipse(230,280,30,30);
ellipse(370,280,30,30);
fill(237,186,149);
//rect(200,230,200,15);
//mouth
fill(250);
triangle(230,370,370,370,300,420);
//mole
strokeWeight(5);
fill(98,63,39);
point(330,447);
//teeth
line(260,390,300,390);
//dimples
noLoop();
stroke(237,175,130);
line(200,360,200,370);
line(400,360,400,370);
}
Creating this self portrait was rather rewarding. I oftentimes struggled keeping track of the coordinates I was using, and I had to reorganize my code multiple times to sort this out. If I had more time, I would like to learn how to animate this portrait, just so that it feels more human and less static.