01-Project-face

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

function draw() {
 fill(75,36,36,[255]); //hair
    ellipse(200,200,230,400);
 fill(212,179,135,[255]);
    ellipse(200,150,180,250); //face
fill(219,58,107,[100]);       
    ellipse((width/2),(height/2+50),70,30); //lips
fill(0)
strokeWeight(3);
    line((width/2-40),(height/2+50),(width/2+40),(height/2+50));
fill(255); //eye whites
    ellipse((width/2-30),(height/2-40),30,15);
    ellipse((width/2+30),(height/2-40),30,15);
fill(75,32,32,[255]);
    ellipse((width/2-30),(height/2-40),10,10);
    ellipse((width/2+30),(height/2-40),10,10);
    arc((width/2-30),(height/2-60),30,10,PI,radians(360)); //eyebrow right
    arc((width/2+30),(height/2-60),30,10,PI,radians(360)); //eyebrow left
fill(164,135,106,[255]); //nose
strokeWeight(1);
    triangle((width/2-15),(height/2+10),(width/2+15),(height/2+10),(width/2),(height/2-30));
fill(223,193,163,[255]);
strokeWeight(1);
    rect((width/2-9),(height/2-30),18,35);
fill(0);
    ellipse((width/2-5),(height/2+5),8,5);
    ellipse((width/2+5),(height/2+5),8,5);
fill(255,204,204,[255]);
    circle((width/2+40),(height/2),30);
    circle((width/2-40),(height/2),30);
noLoop
}

I found creating the proportions most challenging and getting different features in their correct positions.

Leave a Reply