Austin Treu-Project-01-Face

atreu-face

//Austin Treu
//Section C
//atreu@andrew.cmu.edu
//Project-01

function setup() {
    createCanvas(600, 600);
    background(0,255,255);

    //head
    fill(255, 208, 169);
    noStroke();
    ellipse(width/2, height/2, width/2+width/10, height/2+height/4);

    //eyes
        //whites l r
        fill(255);
        ellipse(width/2-width/8, height/2-height/10,width/10, height/15);
        ellipse(width/2+width/8, height/2-height/10,width/10, height/15);
        //iris l r
        fill(160, 177, 110);
        ellipse(width/2-width/8, height/2-height/10, width/15, height/15);
        ellipse(width/2+width/8, height/2-height/10,width/15, height/15);
        //pupils lr
        fill(0);
        ellipse(width/2-width/8, height/2-height/10, width/20, height/20);
        ellipse(width/2+width/8, height/2-height/10,width/20, height/20);

    //nose
    stroke(205, 158, 119);
    line(width/2,height/2-height/15, width/2+width/10, height/2+height/10);
    line(width/2,height/2+height/9,width/2+width/10, height/2+height/10);

    //ears lr
    noStroke();
    fill(255, 208, 169);
    ellipse(width/4-width/18, height/2, width/10, height/5);
    ellipse(3*width/4+width/18, height/2, width/10, height/5);

    //mouth
    fill(254);
    arc(width/2, height/2+height/5, width/5, height/7,0, PI, CHORD);

    //eyebrows lr
    fill(255,220,135);
    quad(width/2-width/5.5, height/2-height/6,
        width/2-width/5.5, height/2-height/7, 
        width/2-width/13, height/2-height/6, 
        width/2-width/13, height/2-height/5);
    quad(width/2+width/5.5, height/2-height/6,
        width/2+width/5.5, height/2-height/7, 
        width/2+width/13, height/2-height/6, 
        width/2+width/13, height/2-height/5);


    //hair
    fill(255,75,0);
        //sideburns lr
        triangle(width/4-width/25,height/2, 
            width/4-width/40, height/4, 
            width/4+width/20, height/4);
        triangle(3*width/4+width/25,height/2, 
            3*width/4+width/40, height/4, 
            3*width/4-width/20, height/4);
        //top
        arc(width/2,height/4, width/2+width/20, height/3, PI, 0, PI);
}

This was an interesting project to work on, as it required simplifying real life down to just rudimentary shapes. The coding wasn’t too difficult, although finding the exact points to place each shape required a decent amount of work.

Leave a Reply