Sharon Yang Project 01 Self-Portrait

sharon-project01

/*Sharon Yang
Section C
junginny
Project-01-Face
*/

function setup() {
    createCanvas(600,800);
    background(254,230,240);

}
function draw() {
    //hair behind the face
    fill(50,41,46);
    rect(100,535,402,370);
    rect();

    //face
    fill(253,227,204);
    noStroke();
    ellipse(290,400,450,400);

    //bangs
    fill(50,41,46);
    noStroke();
    arc(290,320,430,280,PI,PI+PI,OPEN);
    arc(101,308,190,200,0,QUARTER_PI);
    arc(150,308,190,200,0,QUARTER_PI);
    arc(74,308,190,200,0,QUARTER_PI);
    arc(190,308,190,200,0,QUARTER_PI);
    arc(230,308,190,200,0,QUARTER_PI);
    arc(280,308,190,200,0,QUARTER_PI);
    arc(340,308,190,200,0,QUARTER_PI);
    arc(400,308,190,200,0,QUARTER_PI);
    //hair
    noStroke();
    arc(119,390,140,200,HALF_PI,PI+HALF_PI);
    arc(68,560,140,200,PI+HALF_PI,HALF_PI);
    arc(110,670,140,200,HALF_PI,PI+HALF_PI);
    arc(470,390,140,200,PI+HALF_PI,HALF_PI);
    arc(521,560,140,200,HALF_PI,PI+HALF_PI);
    arc(490,670,140,200,PI+HALF_PI,HALF_PI);
    //eyebrows
    fill(0);
    arc(200,415,100,65,PI,TWO_PI);
    fill(253,227,204);
    arc(200,425,120,65,PI,TWO_PI);
    fill(0);
    arc(390,415,100,65,PI,TWO_PI);
    fill(253,227,204);
    arc(390,425,120,65,PI,TWO_PI);
    //eyes
    fill(0);
    ellipse(200,430,85,60);
    ellipse(390,430,85,60);
    fill(255);
    ellipse(225,440,15,15);
    ellipse(415,440,15,15);

    //nose
    stroke(223,197,168);
    strokeWeight(4);
    line(290,460,310,470);
    line(310,470,300,483);
    fill(223,197,168);    

    //mouth
    fill(254,126,130);
    noStroke();
    ellipse(300,520,185,44);
    fill(253,227,204);
    ellipse(300,514,170,38);

    //dimples
    stroke(223,197,168);
    strokeWeight(3);
    arc(194,520,15,15,HALF_PI,PI,OPEN);
    arc(400,520,15,15,TWO_PI,HALF_PI,OPEN);

    //neck
    noStroke();
    fill(253,227,204);
    rect(235,608,120,100);
    fill(253,227,204);
    ellipse(295,591,127,100);

    //shoulders
    fill(5,57,111);
    rect(100,660,400,200,80);

    //v-neck on the shirt
    fill(253,227,204);
    noStroke();
    triangle(230,660,295,770,360,660);
    stroke(255);
    strokeWeight(13);
    line(238,662,300,770);
    line(360,662,300,770);

    //ears
    fill(253,227,204);
    noStroke();
    arc(128,460,100,100,HALF_PI,PI+HALF_PI);
    arc(461,460,100,100,PI+HALF_PI,HALF_PI);

    //earrings
    fill(255);
    ellipse(123,495,14,14);
    ellipse(473,495,14,14);
}

I found the self-portrait project really fun but quite time consuming and tough as I was not yet familiar with the functions in javascript. In order to create shapes, curves and lines, I had to look up the functions that would result in creating the objects I wanted. When I could not figure out some of the advanced functions, it required creativity to create the objects using different shapes. As I could not quite figure out using the berzier function, I used arcs to make the curls on my hair. Finding the right coordinates was also quite tedious at first, but I got used to it and so it took less time perfecting them.

Leave a Reply