//Yugyeong Lee
//Section B
//yugyeonl@andrew.cmu.edu
//Project-01
function setup() {
createCanvas(400, 425);
background(0, 69, 124);
noStroke();
fill(0, 138, 187);
quad(0, 0, width, 0, width, 150, 0, 165);
}
function draw() {
noStroke();
//hair
fill(20);
beginShape();
vertex(118, 103);
vertex(121, 114);
vertex(112, 121);
vertex(88, 167);
vertex(88, 240);
vertex(78, 288);
vertex(90, 348);
vertex(80, 408);
vertex(108, 415);
vertex(127, 327);
vertex(172, 271);
vertex(164, 240);
vertex(218, 214);
vertex(220, 263);
vertex(210, 281);
vertex(210, 338);
vertex(242, 350);
vertex(265, 328);
vertex(242, 165);
vertex(210, 121);
vertex(165, 98);
vertex(135, 98);
vertex(118, 103);
endShape();
//neck
fill(211, 173, 138);
beginShape();
vertex(127, 327);
vertex(151, 286);
vertex(172, 271);
vertex(164, 240);
vertex(218, 214);
vertex(220, 263);
vertex(210, 281);
vertex(210, 338);
vertex(180, 305);
vertex(144, 314);
vertex(127, 327);
endShape();
//face
fill(232, 189, 151);
push();
translate(width/2, height/2);
angleMode(DEGREES);
rotate(-25);
ellipse(-8, 15, 50, 40);
rotate(-5);
ellipse(-8, -42, 106, 145);
ellipse(-62, -35, 15, 30);
pop();
//hair
fill(20);
triangle(98, 224, 122, 114, 122, 168);
quad(160, 111, 185, 117, 217, 147, 194, 135);
//brows
fill(50);
beginShape();
vertex(130, 183);
vertex(134, 176);
vertex(152, 165);
vertex(154, 167);
vertex(136, 178);
vertex(130, 183);
endShape();
beginShape();
vertex(176, 153);
vertex(192, 143);
vertex(202, 143);
vertex(194, 145);
vertex(178, 155);
vertex(176, 153);
endShape();
//mouth
stroke(60)
line(180, 226, 197, 218);
line(197, 218, 211, 207);
line(188, 217, 194, 215);
line(194, 215, 199, 211);
line(192, 226, 200, 223);
line(200, 223, 205, 219);
}
I first worked in Photoshop to simplify a picture of myself into combination of simple geometries. After planning which geometries to use, I took the coordinates from Photoshop and applied them to appropriate code. I used beginShape() and endShape() to insert all the coordinates in more complex shapes while using rotated ellipse, triangle, quad, and lines for simple shapes.