//Georgia Miller
//Section D
function setup() {
createCanvas(800,1000,);
background(229,255,204);
text("p5.js vers 0.9.0 test.", 10, 15);
}
function draw() {
fill(204,102,0);
strokeWeight(0);
ellipse(315,490,480,720); //back of hair
ellipse(340,340,440,430); //mid piece
fill(255,229,191);
ellipse(500,525,240,200); //cheek
ellipse(215,520,50,150); //ear
ellipse(425,400,400,380); //forehead
beginShape(QUADS); //chin and jaw
vertex(255,580);
vertex(320,695);
vertex(530,720);
vertex(555,710);
endShape(CLOSE);
beginShape(QUADS); //chin and jaw
vertex(320,695);
vertex(530,720);
vertex(555,710);
vertex(580,590);
endShape(CLOSE);
beginShape(QUADS); //chin and jaw
vertex(230,460);
vertex(255,580);
vertex(500,690);
vertex(525,570);
endShape(CLOSE);
fill(88,45,0);
beginShape(); //eyebrows
vertex(600,380)
bezierVertex(480,330,540,365,510,357);
bezierVertex(540,300,590,335,600,380);
endShape();
beginShape();
vertex(480,370);
bezierVertex(455,430,460,350,295,410);
bezierVertex(330,350,435,346,480,370);
endShape();
fill(204,102,0); //bangs
beginShape();
vertex(450,155);
bezierVertex(760,100,675,435,625,475);
bezierVertex(560,230,610,345,450,155);
endShape();
beginShape();
vertex(450,155);
bezierVertex(645,100,610,380,570,430);
bezierVertex(530,230,610,400,450,155);
endShape();
beginShape();
vertex(450,155);
bezierVertex(530,205,550,400,515,430);
bezierVertex(500,200,530,345,450,155);
endShape();
beginShape();
beginShape();
vertex(400,200);
bezierVertex(390,250,350,300,380,440);
bezierVertex(340,350,315,234,400,200);
endShape();
beginShape();
vertex(385,130);
bezierVertex(320,360,230,100,330,490);
bezierVertex(380,370,300,300,385,130);
endShape();
beginShape();
fill(250)
vertex(300,130);
bezierVertex(260,360,170,100,240,490);
bezierVertex(300,370,220,300,300,130);
endShape();
strokeWeight(0);
fill(0) //eyeliner
beginShape(QUADS);
vertex(330,430);
vertex(450,435);
vertex(500,465);
vertex(410,465);
endShape();
beginShape(QUADS);
vertex(610,430);
vertex(545,435);
vertex(530,465);
vertex(580,450);
endShape();
beginShape(TRIANGLES); //eyelashes
vertex(395,465);
vertex(400,470);
vertex(380,475);
endShape();
beginShape(TRIANGLES);
vertex(410,475);
vertex(425,475);
vertex(405,490);
endShape();
beginShape(TRIANGLES);
vertex(580,470);
vertex(585,470);
vertex(590,465);
endShape();
beginShape(TRIANGLES);
vertex(590,460);
vertex(595,450);
vertex(600,465);
endShape();
fill(250)
ellipse(430,450,85,40) //white of eyes
ellipse(560,450,60,40);
stroke(0);
strokeWeight(2);
line(525,450,570,525); //nose bridge
line(535,550,560,550);
line(560,550,570,525);
strokeWeight(0) //lips
fill(243,176,176)
beginShape();
vertex(490,630);
vertex(520,590);
vertex(540,600);
vertex(555,590);
vertex(570,605);
vertex(565,630);
vertex(530,640);
endShape();
stroke(100) //cheekbone
strokeWeight(1)
line(250,520,405,590);
line(405,590,450,665);
strokeWeight(0); //cheekbone
fill(255,229,191);
beginShape();
vertex(255,580);
vertex(280,800);
vertex(230,885);
vertex(420,940);
vertex(580,910);
vertex(515,870);
vertex(490,710);
endShape();
strokeWeight(2);//jawline
stroke(0);
line(530,720,555,710);
line(320,695,530,720);
line(555,710,580,590);
line(230,460,255,580);
line(255,580,320,695);
ellipseMode(RADIUS); //eyeballs
fill(171,228,242);
strokeWeight(0)
ellipse(425, 450, 20, 20); // Outer white ellipse
ellipseMode(CENTER);
fill(0);
ellipse(425, 450, 18, 18); // Inner gray ellipse
fill(171,228,242);
ellipseMode(RADIUS);
ellipse(560, 450, 17, 17); // Outer white ellipse
ellipseMode(CENTER);
fill(0);
ellipse(560, 450, 15, 15); // Inner gray ellipse
fill(255,44,199,50); //blush
ellipse(515,505,300,36);
fill(255); //nose shine
ellipse(550,520,20,20);
noLoop();
}
The most challenging thing about this project was trying to find a way to create my bangs. I ended up using really long code.