Project 01: Self Portrait

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

function draw() {
    background(118,148,115);
    noStroke();
    fill(246, 153, 138);
    ellipse(90,102,130,125);//leftheart
    noStroke();
    fill(246, 153, 138);
    ellipse(210,102,130,125);//rightheart
    noStroke();
    fill(246, 153, 138);
    triangle(38,140,width/2,270,262,140);//heartbottom
    noStroke();
    fill(0,0,0);
    ellipse(150,139,100,110);//hair
    noStroke();
    fill(0,0,0);
    quad(100,145,90,190,210,190,200,145);//hair2
    noStroke();
    fill(227,194,148);
    ellipse(150,150,90,100);//face
    noStroke();
    fill(0,0,0);
    ellipse(130,145,15,10); //left_eyelash
    noStroke();
    fill(227,194,148);
    ellipse(130,143,15,10); //left_eyelid
    noStroke();
    fill(0,0,0);
    ellipse(167,145,15,10); //right_eyelash
    noStroke();
    fill(227,194,148);
    ellipse(167,143,15,10); //right_eyelid
    noStroke();
    fill(246, 153, 138);
    ellipse(175,157,15,10); //right_cheek
    noStroke();
    fill(246, 153, 138);
    ellipse(123,157,15,10); //left_cheek
    noStroke();
    fill(0,0,0);
    ellipse(width/2,167,20,15); //mouth
    noStroke();
    fill(227,194,148);
    ellipse(width/2,165,20,15); //mouth2;
    noStroke();
    fill(0,0,0);
    triangle(100,160,width/2,100,115,100); //hairleft;
    noStroke();
    fill(0,0,0);
    triangle(200,160,width/2,100,185,100); //hairright;
    fill(185, 73, 217);
    triangle(161,120,170,137,185,120);//leftclip
    fill(185, 73, 217);
    triangle(195,103,205,120,185,120);//rightclip
    fill(248, 237, 104);
    quad(177,118,186,114,190,122,182,127);//clipmiddle
}


I found it challenging to have to keep guessing and checking where to code the corners of the triangles/quadrilaterals to go, that was probably the most tedious part of the process.

Leave a Reply