Project 1- Self Portrait

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

function draw() {

//hair
    background(252, 225, 152);
    fill(56, 39, 35);
    rect(140, 60, 320, 540, 130, 130, 70, 70);

//head
	fill(240, 208, 180);
	noStroke();
    rect(175, 100, 250, 300, 100, 180, 100, 100);
    rect(265, 370, 70, 120, 30);
    rect(170, 461, 260, 96, 30);
    ellipse(431, 300, 24, 47);
    noFill();

//eyebrows
    stroke(74, 50, 34);
    strokeWeight(8);
    line(290, 200, 340, 200);
    line(180, 200, 225, 200);
    noStroke();

//nose
    stroke(236, 193, 156);
    strokeWeight(3);
    noFill();
    beginShape();
    curveVertex(240, 268);
    curveVertex(240, 268);
    curveVertex(231, 280);
    curveVertex(229, 293);
    curveVertex(235, 301);
    curveVertex(235, 301);
    endShape();
    noStroke();

//moles
    fill(74, 20, 0);
    ellipse(307, 362, 2, 2);
    ellipse(347, 278, 5, 5);
    ellipse(212, 286, 3, 3);

//eyes
    fill(255);
    noStroke();
    ellipse(310, 236, 36, 21);
    ellipse(204, 236, 36, 21);
    stroke(0);
    strokeWeight(4);
    noFill();
    beginShape();
    curveVertex(292, 231);
    curveVertex(292, 231);
    curveVertex(309, 223);
    curveVertex(328, 230);
    curveVertex(340, 233);
    curveVertex(351, 226);
    curveVertex(351, 226);
    endShape();
    beginShape();
    curveVertex(223, 231);
    curveVertex(223, 231);
    curveVertex(208, 223);
    curveVertex(188, 230);
    curveVertex(188, 230);
    endShape();
    fill(0);
    ellipse(310, 235, 18, 18);
    ellipse(206, 235, 18, 18);
    noStroke();

//shirt
    fill(240, 208, 180);
    noStroke();
    rect(415, 529, 55, 200);
    rect(130, 529, 55, 200);
    fill(255);
    noStroke();
    beginShape();
    curveVertex(413, 550);
    curveVertex(413, 550);
    curveVertex(416, 517);
    curveVertex(421, 494);
    curveVertex(427, 476);
    curveVertex(441, 477);
    curveVertex(456, 487);
    curveVertex(467, 500);
    curveVertex(474, 516);
    curveVertex(475, 530);
    curveVertex(464, 537);
    curveVertex(451, 545);
    curveVertex(432, 552);
    curveVertex(432, 552);
    endShape();
    beginShape();
    curveVertex(185, 550);
    curveVertex(185, 550);
    curveVertex(182, 516);
    curveVertex(178, 493);
    curveVertex(172, 476);
    curveVertex(157, 477);
    curveVertex(140, 487);
    curveVertex(132, 500);
    curveVertex(125, 516);
    curveVertex(124, 529);
    curveVertex(135, 537);
    curveVertex(148, 545);
    curveVertex(167, 551);
    curveVertex(167, 551);
    endShape();
    rect(180, 550, 240, 100);

//hair 2 
    stroke(232, 222, 218);
    strokeWeight(30);
    line(189, 155, 189, 570);
    line(372, 130, 372, 570);
    noFill();
    beginShape();
    curveVertex(295, 104);
    curveVertex(295, 104);
    curveVertex(336, 103);
    curveVertex(364, 114);
    curveVertex(374, 142);
    curveVertex(374, 142);
    endShape();
    beginShape();
    curveVertex(189, 159);
    curveVertex(189, 159);
    curveVertex(196, 133);
    curveVertex(222, 112);
    curveVertex(248, 107);
    curveVertex(270, 106);
    curveVertex(270, 106);
    endShape();
    noStroke();
    fill(56, 39, 35);
    rect(386, 100, 39, 485, 60);

//earring
    noFill();
    stroke(233, 233, 233);
    strokeWeight(4);
    ellipse(431, 377, 61, 123);
    noStroke();

//mouth
    noStroke();
    fill(240, 190, 180);
    beginShape();
    curveVertex(217, 335);
    curveVertex(217, 335);
    curveVertex(221, 328);
    curveVertex(228, 324);
    curveVertex(235, 323);
    curveVertex(243, 324);
    curveVertex(250, 326);
    curveVertex(255, 330);
    curveVertex(258, 335);
    curveVertex(253, 340);
    curveVertex(245, 341);
    curveVertex(238, 342);
    curveVertex(230, 341);
    curveVertex(224, 339);
    curveVertex(224, 339);
    endShape();
    stroke(212, 113, 139);
    strokeWeight(3);
    line(220, 333, 255, 333);
    noStroke();
    



}

Leave a Reply