sophiaq-Project-01-Face

sketch

function setup() {
    createCanvas(600, 600);
    background(250,140,171);
    //text("p5.js vers 0.5.2 test.", 10, 15);
}

function draw() {
    //hair
    noStroke();
    fill(0);
    ellipse(300,280,300,400);
    //head
    strokeWeight(0);
    fill(255,232,212);
    ellipse(300,250,250,300);
    //body
    fill(140,217,250);
    ellipse(320,450,140,90);
    //neck
    fill(255,232,212);
    rect(300,380,40,30);
    //eyes
    fill(255,255,255);
    ellipse(250,250,30,30);
    ellipse(350,250,30,30);
    //pupil
    fill(0,0,0);
    ellipse(250,250,10,10);
    ellipse(350,250,10,10);
    //nose
    noFill();
    stroke(255,209,168);
    strokeWeight(2);
    arc(300,290,25,10,0,180)
    //smile
    noFill();
    stroke(255,158,206);
    strokeWeight(2);
    arc(300,330,30,50,290,90);
    //lips
    fill(255,158,206);
    ellipse();
    //cheek
    noStroke();
    fill(0);
    noFill();
    stroke(255,158,206);
    strokeWeight(2);
    ellipse(200,300,40,40);
    ellipse(400,300,40,40);
    //eyebrows
    noFill();
    stroke(0);
    arc(250,250,100,100, PI, 3/2*PI);
    arc(350,250,100,100,PI+QUARTER_PI,0);

}

It was a bit difficult figuring out the geometry of the face, so I tried my best! I think sketching it on photoshop would have been easier for me to code and to create a better looking face

Leave a Reply