Project 1, odh

odh-02

//Owen D Haft
//odh@andrew.cmu.edu

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

    //ears
    strokeWeight(1)
    fill(255, 219, 172)
    ellipse(145, 240, 50, 90)
    ellipse(455, 240, 50, 90)
    
    //head
    fill(255, 219, 172);
    ellipse(300, 250, 300, 400);

    //eyes
    fill(255);
    ellipse(240, 225, 75, 40);
    ellipse(360, 225, 75, 40);

    fill(0, 255, 220);
    ellipse(250, 224, 35, 35);
    ellipse(370, 224, 35, 35);

    fill(0);
    ellipse(250, 224, 20, 20);
    ellipse(370, 224, 20, 20);

    fill(255);
    ellipse(256, 215, 16, 16);
    ellipse(376, 215, 16, 16);         

    //mouth
    noFill();
    strokeWeight(5);
    arc(300, 350, 150, 40, 0, PI, PI)
    arc(300, 350, 150, 30, 0, PI, PI)

    //hat
    fill(150, 0, 0)
    strokeWeight(1)
    arc(300, 150, 260, 220, PI, PI, PI)
    
    fill(200, 0, 0)
    arc(320, 150, 300, 40, PI, PI, PI)

    fill(150, 0, 0)
    ellipse(300, 35, 40, 15)


    //eyebrows
    fill(230, 206, 168)
    rect(195, 180, 80, 10)
    rect(325, 180, 80, 10)
    
    //nose
    strokeWeight(3)
    line(300, 225, 330, 310)
    line(330, 310, 290, 310)


  
}

function draw() {
    if (millis() > 2000) {
        osc.stop();
        noLoop();
    }
}

I worked systematically from the larger shapes of my portrait down to the smaller details. Looking back, the portrait would greatly benefit from the usage of more complex methods of coding, which I yet to learn or become more comfortable with (i.e. curves, rotate). Therefore, I stuck with the more simple geometries.

Leave a Reply