Jina Lee – Project – 01

Before starting this code, I made an Adobe Illustrator file. The reference made it easier for me to understand where the coordinates were. When I first started, I couldn’t mentally imagine the where the shapes were on the canvas, but as I added more elements it got easier.

This was the reference that I used when making the base of my self-portrait.

sketch

function setup() {
    //Jina Lee
    //Section E
    //jinal2@andrew.cmu.edu
    //Project-01(Self-Portrait)

    createCanvas(400, 400);
    background('rgb(46, 175, 74)');
    
    //hair
    noStroke();
    fill('rgb(61, 52, 35)');
    rect(50, 160, 80, 150);
    
    noStroke();
    fill('rgb(61, 52, 35)');
    rect(270, 160, 80, 150);
    
    noStroke();
    fill('rgb(61, 52, 35)');
    ellipse(200, 160, 300, 210);
    
    //face
    noStroke();
    fill('rgb(201, 171, 112)');
    rect(163.5, 270, 71.2, 40);
    
    noStroke();
    fill('rgb(221, 188, 115)');
    ellipse(200, 180, 250, 210);
    
    noStroke();
    fill('rgb(221, 188, 115)');
    ellipse(70, 180, 30, 40);
    
    noStroke();
    fill('rgb(221, 188, 115)');
    ellipse(330, 180, 30, 40);

    //shirt
    noStroke();
    fill('rgb(118, 185, 219)');
    arc(200, 401, 250, 200, PI, 0, CHORD);

    noStroke();
    fill('rgb(201, 171, 112)');
    arc(199, 301, 71, 65, 0, PI, OPEN);
    
    //eyes
    noStroke();
    fill('white');
    ellipse(130, 160, 60, 60);
    
    noStroke();
    fill('white');
    ellipse(275, 160, 60, 60);
    
    noStroke();
    fill('black');
    ellipse(275, 160, 30, 30);
    
    noStroke();
    fill('black');
    ellipse(130, 160, 30, 30);

    //earrings
    noStroke();
    fill('rgb(183, 183, 183)');
    arc(340, 170, 10, 10, 0, PI + QUARTER_PI, PIE);

    noStroke();
    fill('white');
    ellipse(335, 190, 5, 5);

    noFill();
    stroke('rgb(183, 183, 183)');
    strokeWeight(2);
    arc(330, 199, 10, 10, 0, PI);

    noFill();
    stroke('rgb(183, 183, 183)');
    strokeWeight(2);
    arc(70, 199, 10, 10, 0, PI);
    
    //mouth
    noStroke();
    fill('white');
    ellipse(200, 230, 50, 50);

    noStroke();
    fill('black');
    arc(200, 230, 50, 50, 0, PI, PIE);
    
    stroke('black');
    strokeWeight(4);
    line(200, 250, 200, 206.5);

    //baby hairs
    noFill();
    stroke('rgb(61, 52, 35)');
    strokeWeight(10);
    line(110, 60, 130, 80);

    noFill();
    stroke('rgb(61, 52, 35)');
    strokeWeight(10);
    line(130, 60, 130, 80);
}

function draw() {          
}

Leave a Reply