Project 01 – Self Portrait

This is what I wish I looked like.

Self-PortraitDownload
function setup() {
    createCanvas(800, 800);
    background(250);
}

function draw() {
//German Flag background
    fill(0, 0, 0);
    rect(0, 0, 800, 800/3);   //creates the black portion
    fill(218, 41, 28);
    rect(0, 800/3, 800, 1600/3);    //creates the red portion
    fill(255, 205, 0);
    rect(0, 1600/3, 800, 800);    //creates the yellow portion
//left face line
    line(250, 250, 250, 500);
//right face line
    line(550, 250, 550, 500);
//hat
    strokeWeight(3);
    fill(155, 175, 220);
    arc(400, 250, 300, 225, PI, 0, CHORD);   //creates the hat itself
    fill(255, 233, 220);
    arc(400, 230, 90, 60, PI, 0, CHORD);    //provides the skin color underneath
    arc(340, 300, 50, 15);    //provides the smaller arc within the hat
//left jawline
    line(250, 500, 370, 570);
//right jawline
    line(550, 500, 430, 570);
//chin
    strokeWeight(2);
    arc(400, 570, 60, 20, 0, PI);    //physical chin
    strokeWeight(0);
    rect(250, 250, 300, 250);   //the following chin commands are all to color that portion of the face
    fill(255, 233, 220);
    rect(370, 470, 60, 100);
    triangle(250, 500, 370, 500, 370, 570);
    triangle(550, 500, 430, 570, 430, 500);
    strokeWeight(1);
//eyebrows
    strokeWeight(4);
    fill(0, 0, 0);
    quad(370, 280, 370, 290, 300, 295, 305, 285);   //left eyebrow
    strokeWeight(5);
    noFill();
    arc(460, 290, 55, 30, PI, 0);   //right eyebrow
//nose
    fill(255, 233, 220);
    strokeWeight(3);
    arc(400, 395, 30, 25, 0, PI);
    arc(385, 395, 15, 15, 1/2*PI, 3/2*PI);    //left nostril
    arc(415, 395, 15, 15, 3/2*PI, 1/2*PI);    //right nostril
//mouth
    fill(250, 250, 250);
    arc(400, 450, 100, 100, 0, PI, CHORD);

//eyes
    ellipse(340, 310, 50, 25);    //left eye
    ellipse(460, 310, 50, 25);    //right eye
    fill(100, 41, 19);
    ellipse(340, 310, 30, 25);    //left iris
    ellipse(460, 310, 30, 25);    //right iris
    fill(0, 0, 0);
    circle(340, 310, 15);   //left pupil
    circle(460, 310, 15);   //right pupil

}

Leave a Reply