John Legelis p5.js Self Portrait

JJ-Face-Project

function setup() {
    createCanvas(600, 600);
    background(70,150,0);
}


function draw() {   
    ellipseMode(CENTER);
    noStroke();
    //face ellipse
    fill(198,156,109);
    ellipse(300,300,360,480);

    //cover bottom half of face in green
    fill(70,150,0);
    quad(120,400, 120,600, 480,600, 480,400);

    //jaw trapazoid
    fill(198,156,109);
    quad(136,400, 464,400, 360,520, 240,520);

    //ears left the right
    ellipse(110,300, 40,120);
    ellipse(490,300, 40,120);

    //eye whites left then right
    fill(255,255,255);
    arc(210,300, 70,50, PI, 0, OPEN);
    arc(390,300, 70,50, PI, 0, OPEN);

    //irises left then right
    fill(0,118,163);
    ellipse(210,288,24,24);
    ellipse(390,288,24,24);

    //pupils left then rigt
    fill(0,0,0);
    ellipse(210,288,12,12);
    ellipse(390,288,12,12);

    //lips
    fill(212,62,92)
    beginShape();
    vertex(290,450);
    vertex(300,455);
    vertex(310,450);
    vertex(345,460);
    vertex(315,470);
    vertex(285,470);
    vertex(255,460);


    endShape(CLOSE);

    //nosebridge lines left then right
    stroke(0);
    strokeWeight(1)
    line(290,300,288,400);
    line(310,300,312,400);
    //nose bubbles
    noFill()
    ellipse(285,412,24,24);
    ellipse(315,412,24,24);
    ellipse(300,416,15,15);
    //blockthecircles
    fill(198,156,109);
    noStroke();
    beginShape();
    vertex(288,400);
    vertex(312,400);
    vertex(312,420);
    vertex(288,420);
    endShape(CLOSE);

    //eyebrows left then right
    fill(208,181,55);
    rectMode(CORNERS);
    rect(245,270,175,255);
    rect(355,270,425,255);

    //hair
    beginShape()
    vertex(120,200);
    vertex(130,100);
    vertex(160,60);
    vertex(400,60);
    vertex(420,120);
    vertex(430,70);
    vertex(440,120);
    vertex(455,80);
    vertex(454,120);
    vertex(470,200);
    endShape(CLOSE);
}

As I created this portrait, I felt my intuition increasing with p5.js.  The p5.js.org website was very helpful for discovering new tools that would help with novel shapes. The hair was especially difficult to create.

 

Leave a Reply