Project 01 | Self Portrait

here is my self portrait!

sketch

function setup() {
    createCanvas(300, 300);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    background(106, 148, 212);     //blue
    fill(34, 67, 116);             //dark blue
    stroke(34, 67, 116);           
    triangle(0, 299, 299, 0, 299, 299);

    //hair
    fill(61, 97, 153);            //medium blue
    stroke(61, 97, 153); 
    ellipse(150, 65, 75, 55);
    fill(92, 128, 184);           //lighter medium blue
    stroke(92, 128, 184);
    ellipse(150, 148, 140, 160);

    //shirt
    fill(255, 153, 204);            //pink
    stroke(255, 153, 204);
    rect(30, 240, 240, 120, 60);
    fill(219, 112, 147);            //darker pink
    stroke(219, 112, 147);
    ellipse(150, 245, 80, 40);    

    //neck
    fill(216, 226, 240);            //a little darker than light blue
    stroke(216, 226, 240);
    rect(115, 150, 70, 90);        
    ellipse(150, 240, 70, 40);

    //face
    fill(226, 237, 252);
    stroke(229, 239, 255);
    ellipse(150, 162, 130, 142);    //light blue
    fill(255, 153, 204, 40);        //transparent pink
    stroke(255, 153, 204, 0);
    circle(110, 190, 30);
    circle(190, 190, 30);

    //nose
    fill(160, 188, 229);
    stroke(160, 188, 229);
    circle(150, 180, 17);        
    circle(141, 183, 8);
    circle(159, 183, 8);
    fill(229, 239, 255);
    stroke(229, 239, 255);
    circle(150, 177, 17);        
    circle(141, 180, 8);
    circle(159, 180, 8);
    noLoop();

    //eyes
    fill(255);                     //white
    stroke(160, 188, 229, 50);
    circle(125, 150, 25);          
    circle(175, 150, 25);
    fill(160, 188, 229);           //blue
    stroke(160, 188, 229);
    ellipse(121, 150, 16, 19);
    ellipse(172, 150, 16, 19);
    fill(34, 67, 116);             //dark blue
    stroke(34, 67, 116);
    ellipse(118, 150, 12, 15);
    ellipse(169, 150, 12, 15);
    fill(255);
    stroke(255)                    //white
    circle(119, 147, 5);
    circle(170, 147, 5);
    stroke(160, 188, 229);
    strokeWeight(4);                //blue
    line(112, 134, 124, 130);
    line(186, 134, 174, 130);
    noLoop();


    //mouth
    fill(160, 188, 229);            //blue
    stroke(160, 188, 229);
    strokeWeight(1);
    arc(150, 203, 35, 12, 0, PI);
    fill(229, 239, 255);            //light blue
    stroke(229, 239, 255);
    arc(150, 201, 35, 8, 0, PI);
}

Leave a Reply