Project Week 1 – Self-Portrait

hyt-01

// helen tsui
// 15-104 section d
// hyt@andrew.cmu.edu
// project-01

function setup() {
    createCanvas(400, 400);
    background(60, 105, 128); 
}

function draw() {

stroke(200, 197, 209);
strokeWeight(8);

    fill(250, 225, 223); 
    arc(400, 80, 700, 600, QUARTER_PI, PI);
    ellipse(120, 130, 150, 150); //glasses
    ellipse(320, 130, 150, 150); //glasses
    line(210, 160, 230, 280); 
    line(230, 280, 270, 270); 
    curve(290, 300, 320, 328, 335, 330, 340, 348);
    noFill();
    //curve(0 , 80, 0, 200, 80, 300, 80, 400);
        

noStroke();

    fill(10, 10, 10); 
    arc(130, 140, 100, 40, PI, PI); //eyelid left
    arc(330, 140, 100, 40, PI, PI); //eyelid right

    fill(84, 106, 123);
    ellipse(130, 150, 45, 45); //eyeball left
    ellipse(330, 150, 45, 45); //eyeball right

}

For this project, I assorted a color palette for my self-portrait and used functions including curve, arc, fill, rect, strokes, etc. The process was difficult as I have never coded before, but the trial-and-error method eventually worked out well.

Leave a Reply