/*
* Angela Lee
* Section E
* ahl2@andrew.cmu.edu
* Assignment 1 Self-Portrait
*/
function setup(){
createCanvas (600, 600);
background (249, 217, 217);
noStroke();
// hair behind the shoulders
fill (40, 27, 5);
rect (129, 216, 325, 361);
// shirt
fill (239, 223, 223);
ellipse (287.5, 652, 413, 342);
// hair at the top of the head
fill (40, 27, 5);
ellipse (290.5, 235, 329, 342);
// neck
fill (206, 162, 132);
rect (215, 365, 151, 128);
ellipse (144.864, 293.5, 46.271, 79);
// left hoop earring
noFill();
stroke (186, 146, 56);
strokeWeight (12);
ellipse (144.5, 347.5, 51, 51);
// left earing stud
noStroke();
fill (216, 176, 97);
ellipse (144.5, 314.5, 13, 13);
// right hoop earring
noFill();
stroke (186, 146, 56);
strokeWeight (12);
ellipse (423.5, 353.5, 51, 51);
// face
noStroke();
fill (224, 186, 153);
ellipse (291.5, 280.5, 295, 333);
// right eye
fill ("black")
ellipse (362.571, 284.571, 33.143, 33.143);
triangle (378, 278.286, 363.143, 268, 386, 268);
// right eyebrow
rectMode (CENTER);
translate (351.346, 237.903);
rotate (6.21);
fill (58, 45, 32);
rect (0, 0, 53, 9);
rotate (-6.21);
translate (-351.346, -237.903);
// hair surrounding the upper left area of the face
translate (202.207, 163.026);
fill (40, 27, 5);
rotate (2.4);
ellipse (0, 0, 176.657, 32.935);
rotate (-2.4);
translate (-202.207, -163.026);
// hair on the right area of the face
quad (256.801, 118.331, 454, 365, 453, 206, 335, 85);
// left eye
fill ("black")
ellipse (217.429, 280.571, 33.143, 33.143);
triangle (202, 274.286, 216.857, 264, 194, 264);
// left eyebrow
rectMode (CENTER);
translate (220.483, 237.903);
rotate (-6.21);
fill (58, 45, 32);
rect (0, 0, 53, 9);
rotate (6.21);
translate (-220.483, -237.903);
triangle (194.364, 231.555, 196.263, 240.371, 172.596, 244.129);
// nose
fill (214, 171, 139);
triangle (288.7, 278, 306, 341.9, 271.4, 341.9);
ellipse (288.692, 343.42, 34.615, 19.16);
// mouth
rectMode (CORNER);
fill (124, 53, 53);
ellipse (288.762, 384, 67.524, 42);
fill (224, 186, 153);
rect (246, 360, 89, 21);
// hair in front of the shoulders
fill (40, 27, 5);
rect (129, 432, 86, 200);
// rounded collar of the shirt
fill (206, 162, 132);
ellipse (290.5, 493, 151, 80);
}
I really enjoyed playing with some of the details in this self-portrait; for example, I always put half of my hair in front of my shoulders and the other half behind my back. While the process was a bit tedious because I had some coding errors, doing it one shape at a time definitely allowed me to fix those mistakes efficiently.