When first given the assignment to code a self portrait, my immediate thought was to create a portrait that was as realistic as possible. However, given my very little knowledge of coding, I soon found that that wouldn’t be possible. So I then turned to a more graphic, animated concept. Instead of creating a foreground and background portrait, I decided to use the entire canvas to illustrate my face. Once figuring out the placement of my face and hair, it was quick and easy to place and “draw” the rest of my facial features.
function setup() {
createCanvas(600, 500);
background(54, 37, 29);
}
function draw() {
noStroke();
//face
fill(250, 209, 178);
rectMode(CENTER);
rect(300, 450, 400, 600, 100);
//hair
fill(54, 37, 29);
ellipseMode(CENTER);
ellipse(500, 70, 600, 500);
ellipse(100, 10, 300, 600);
//eyes
stroke(255);
strokeWeight(3);
fill(65, 56, 23);
ellipseMode(CENTER);
ellipse(200, 350, 40, 40);
ellipse(400, 350, 40, 40);
noStroke();
fill(255);
ellipse(190, 340, 10, 10);
ellipse(390, 340, 10, 10);
//mouth
fill(0);
arc(300, 425, 150, 100, 0, PI);
fill(255);
ellipseMode(CENTER);
ellipse(300, 425, 150, 25);
fill(250, 209, 178);
rect(300, 400, 200, 50);
//nose
fill(233, 194, 164);
arc(300, 395, 45, 20, 0, PI);
}