Project 02

This is my variable face project

this is my project

sketch
// Natalie Koch; Section A

function setup() {
    createCanvas(480, 640);
    background(0);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    background(132,200,180);
    fill(0)
    ellipse(240,310,420,410) //back of hair
    fill(255,208,172)
    ellipse(90,350,50,70) //left ear
    ellipse(390,350,50,70) //right ear
    rect(175,400,125,200) //neck
    ellipse(width/2,height/2,300,350) //head
    fill(197,220,222) 
    rect(90,250,125,100) //left glasses lens
    rect(265,250,125,100) //right glasses lens
    fill(255,208,172) 
    rect(205,345,70,30) //nose
    fill(0)
    line(215,275,265,275) //glasses bridge
    line(190,420,290,420) //mouth
    rect(90,200,300,50) //bangs
    ellipse(240,175,275,100) //bangs
    fill(255)
    rect(140,260,65,20) //glasses light flare
    rect(315,260,65,20) //glasses light flare
    fill(81,89,66)
    ellipse(240,639,500,150) //shirt

if (mouseIsPressed) {
    background (180,39,8)
    fill(0)
    ellipse(240,310,420,410) //back of hair
    fill(255,208,172)
    ellipse(90,350,50,70) //left ear
    ellipse(390,350,50,70) //right ear
    rect(175,400,125,200) //neck
    ellipse(width/2,height/2,300,350) //head
    fill(33,13,5)
    ellipse(width/2,430,140,50) //mouth
    fill(255)
    rect(190,405,100,20) //teeth
    fill(0)
    rect(90,200,300,50) //bangs
    ellipse(240,175,275,100) //bangs
    fill(81,89,66)
    ellipse(240,639,500,150) //shirt
    fill(255)
    ellipse(155,300,70,60) //eye base
    ellipse(330,300,70,60) //eye base
    fill(0)
    ellipse(160,295,40,40) //pupil
    ellipse(325,295,40,40) //pupil
    fill(197,220,222)
    rect(90,320,125,100) //left glasses lens
    rect(265,320,125,100) //right glasses lens
    line(80,300,90,370) //left earpiece
    line(390,370,400,300) //right earpiece
    fill(255,208,172)
    rect(205,345,70,30) //nose
    fill(255)
    rect(140,330,65,20) //glasses light flare
    rect(315,330,65,20) //glasses light flare
    ellipse(170,290,20,20) //eye light flare
    ellipse(340,290,20,20) //eye light flare
    fill(70,43,15)
    ellipse(150,200,80,40) //eyebrows color
    ellipse(325,200,80,40) //eyebrows color
    fill(0)
    ellipse(150,210,70,30) //eyebrows cover
    ellipse(325,210,70,30) //eyebrows cover (i don't know how to code arcs!)
}
}

Leave a Reply