danakim-Project-01-face

danakim_project01

//Dana Kim
//danakim@andrew.cmu.edu
//Section D
//Self Portrait

function setup() {
    createCanvas(400, 400);
    background(170, 200, 192);
}

function draw() {
    //Background grid stroke properties
    stroke(244, 205, 44);
    strokeWeight(5);

    //Background grid
    line(100, 0, 100, 400);
    line(200, 0, 200, 400);
    line(300, 0, 300, 400);
    line(0, 100, 400, 100);
    line(0, 200, 400, 200);
    line(0, 300, 400, 300);

    //Hair
    noStroke();
    fill(33, 23, 12);
    ellipse(216, 147, 105, 71);
    ellipse(157, 168, 54, 61);
    ellipse(146, 250, 47, 212);
    ellipse(250, 250, 52, 200);
    ellipse(200, 250, 30, 200);
    ellipse(190, 250, 35, 200);
    ellipse(175, 250, 42, 205);
    ellipse(215, 250, 25, 203);
    ellipse(225, 250, 30, 206);

    //Face
    noStroke();
    fill(228, 195, 173);
    ellipse(200, 210, 130, 137);

    //eyes
    fill(265);
    ellipse(230, 200, 25, 23);
    ellipse(168, 200, 25, 23);

    fill(114, 67, 6);
    ellipse(234, 200, 16, 18);
    ellipse(172, 200, 16, 18);

    //eyebrows
    noFill();
    stroke(33, 23, 12);
    strokeWeight(5.0);
    strokeJoin(ROUND);
    beginShape();
    vertex(217, 172);
    vertex(243, 165);
    vertex(251, 174);
    endShape();

    line(149, 174, 185, 174);

    //Nose
    stroke(33, 23, 12);
    strokeWeight(1);
    line(200, 205, 196, 230);
    line(196, 230, 200, 230);

    //Lips
    noStroke();
    fill(227, 157, 143);
    triangle(189, 247, 197, 240, 209, 247);
    triangle(199, 247, 209, 240, 216, 247);

    fill(211, 132, 116);
    arc(200, 247, 27, 15, 0, PI, CHORD);

    //neck
    fill(228, 195, 173);
    rect(185, 270, 30, 50);

    //body
    fill(44, 59, 134);
    rect(150 ,320, 100, 20);

    fill(90, 100, 149);
    quad(160, 340, 240, 340, 235, 400, 165, 400);
}

I can barely draw people by hand let alone coding. However, the coding aspect of the project was not difficult. If anything it was a bit time consuming figuring out coordinates.

Leave a Reply