Christine Chen-Project-01-Face

Christine Chen-Project-01-Face

/* 
Christine Chen
Section E
cyc1@andrew.cmu.edu
Project-01-Face
*/

function setup() {
    createCanvas(600, 500);
    background(172, 199, 250);
    noStroke();
    smooth();

    //dark brown hair
    var b=color(73, 48, 33); 
    fill(b);
    ellipse(300, 250, 350, 410);

    //neck
    var n=color(241, 192, 156);
    fill(n);
    rect (250, 260, 100, 100);

    //ears
    fill(n);
    ellipse(185, 220, 40, 60);
    ellipse(415, 220, 40, 60);

    //face
    var f=color(253, 211, 181); 
    fill(f);
    ellipse(300, 200, 240, 250);

    //bangs
    fill(b);
    triangle(370, 70, 220, 90, 130, 250);
    ellipse(270, 80, 110, 20);
    triangle(300, 70, 390, 90, 450, 250);

    //brows
    fill(b);
    ellipse(245, 190, 40, 20);
    ellipse(345, 190, 40, 20);
    fill(f);
    ellipse(245, 195, 40, 20);
    ellipse(345, 195, 40, 20);

    //blush
    fill(254, 158, 158);
    ellipse(230, 260, 45, 45);
    ellipse(370, 260, 45, 45);

    //eyes
    fill(40, 40, 40);
    ellipse(255, 220, 20, 20);
    ellipse(345, 220, 20, 20);

    //pupil
    fill(255, 255, 255);
    ellipse(260, 220, 5, 5);
    ellipse(350, 220, 5, 5);

    //nose
    fill(n);
    ellipse(300, 230, 20, 30);

    //lips
    fill(253, 125, 125);
    ellipse(300, 280, 50, 40);
    ellipseMode(CENTER);
    fill(f);
    ellipse(300, 265, 60, 20);

    //shirt
    rectMode(CENTER);
    fill(199, 88, 88);
    rect(300, 480, 220, 270, 60);

    //flower petals
    fill(255, 204, 67);
    ellipse(232, 150, 20, 20); //bottom right petal
    ellipse(215, 150, 20, 20); //bottom left
    ellipse(223.5, 125, 20, 20); //top center
    ellipse(208, 134, 20, 20); //top left
    ellipse(239, 134, 20, 20); //top right

    //flower center
    fill(227, 67, 67);
    ellipse(224, 140, 20, 20); 
    //
}

This is my very first project for this class. Throughout the process of creating the self portrait, I experimented with utilizing various simple geometric shapes to resemble face features. While I haven’t started learning about writing the codes for more complex shapes that may perhaps show some particular feature better, I realized that I could create more complex shapes by layering simpler shapes together! Overall, I enjoyed creating this piece as it fascinates me how codes can be used to control colors and shapes to create aesthetic images!

Leave a Reply