SooA Kim – Project 01

project1

//15-104, Section C
//SooA Kim
//sookim@andrew.cmu.edu

function setup() {
    createCanvas(600, 600);
}

function draw() {
    background(100, 100, 150);

    //hair
    fill(0);
    ellipse(400, 330, 200, 250);
    ellipse(420, 450, 250, 250);
    ellipse(200, 350, 180, 220);
    ellipse(190, 460, 180, 180);
    ellipse(180, 570, 200, 200);
    ellipse(500, 560, 150, 150);

    //ears
    fill('#F5E0CD');
    ellipse(300, 320, 280, 150);

    //neck
    rect(255, 350, 100, 200);

    //face
    stroke(255, 255, 255);
    strokeWeight(3);
    ellipse(300, 300, 230, 300);

    //eyes
    noStroke();
    fill(0);
    ellipse (252, 280, 35, 35);
    ellipse (357, 280, 35, 35);

    //dot
    ellipse(357, 301, 5, 5);

    //eyelid
    noFill();
    stroke(0);
    strokeWeight(8);
    arc(245, 283, 57, 50, PI, TWO_PI);
    arc(350, 283, 57, 50, PI, TWO_PI);

   //mouth
    stroke('#C69C6D');
    strokeWeight(5);
    arc(300, 320, 50, 50, HALF_PI, PI - QUARTER_PI);

    //lips
    fill('#E55F55');
    noStroke();
    ellipse(310, 400, 40, 20);

    //hair bang
    fill(0);
    push();
    rotate(PI / 5.0);
    ellipse(385, -80, 250, 120);
    pop();
    push();
    rotate(PI / 3.5);
    ellipse(280, -45, 120, 230);
    pop();
    
    //body
    fill(50, 50, 50); 
    rect(150, 480, 320, 200, 50);

    //hair bang2
    push(); 
    fill(0);
    rotate(PI / 3.5);
    ellipse(610, -35, 150, 250);
    ellipse(670, 0, 250, 250);
    pop();
    fill(0);
    ellipse(170, 550, 150, 180);

     //earring
    fill(255)
    ellipse (180, 360, 12, 12);
    fill(255)
    triangle(165, 400, 180, 365, 200, 400); 
}

This was my first time generating an image by writing code. It helped me get familiar with coordinates in my canvas and realize the hierarchy/or lines to identify layers when you code in your text editor.

Leave a Reply