//Name: Alessandra Fleck
//Class Section : B
//Email: afleck@andrew.cmu.edu
//Project-01
function setup() {
createCanvas(600, 600);
background(146,199,159);
noStroke();
//text("p5.js vers 0.5.12 test.", 10, 15);
}
function draw() {
//face shape
beginShape();
fill(225,225,225);
vertex(319, 0);
vertex(333, 96);
vertex(308, 261);
vertex(289, 363);
vertex(270, 400);
vertex(176, 505);
vertex(124, 537);
vertex(42, 545);
vertex(0, 539);
vertex(0, 0);
endShape(CLOSE);
//eye
beginShape();
fill("white");
vertex(275, 128);
vertex(244, 136);
vertex(216, 139);
vertex(160, 132);
vertex(154, 122);
vertex(176, 107);
vertex(210, 94);
vertex(256, 106);
endShape(CLOSE);
//tri 01
beginShape();
fill(183,183,183);
vertex(319, 0);
vertex(256, 106);
vertex(210, 94);
vertex(206, 0);
endShape(CLOSE);
//tri 02
beginShape();
fill(172,172,172);
vertex(275, 128);
vertex(224, 136);
vertex(216, 139);
vertex(250, 250);
endShape(CLOSE);
//tri 03
beginShape();
fill(203,202,202);
vertex(224, 136);
vertex(216, 139);
vertex(160, 132);
vertex(250,250);
endShape(CLOSE);
//lips
beginShape();
fill(203,87,136);
vertex(145, 400);
vertex(127, 422);
vertex(97, 440);
vertex(0, 421);
vertex(0, 396);
vertex(19, 400);
vertex(60, 414);
endShape(CLOSE);
beginShape();
fill(2244,195,216);
vertex(0, 366);
vertex(36, 352);
vertex(61, 361);
vertex(81, 358);
vertex(103, 364);
vertex(146, 395);
vertex(104, 403);
vertex(67, 394);
vertex(27, 393);
vertex(0, 391);
endShape(CLOSE);
//ear
beginShape();
fill(183,183,183);
vertex(306, 256);
vertex(346, 229);
vertex(377, 160);
vertex(398, 0);
vertex(320, 0);
endShape(CLOSE);
//contour
beginShape();
fill(112,112,112);
vertex(301, 0);
vertex(319, 0);
vertex(333, 96);
vertex(308, 261);
vertex(289, 363);
vertex(270, 400);
vertex(250, 250); // cheek insert
vertex(275, 128);
endShape(CLOSE);
//pupil
fill("white");
ellipse(210, 118, 50, 40);
fill("grey");
ellipse(210, 110, 40, 30);
fill("black");
ellipse(210, 118, 30, 30);
fill("white");
ellipse(205, 112, 20, 20);
//nose
beginShape();
fill(203,202,202);
vertex(0, 298);
vertex(48, 304);
vertex(64, 308);
vertex(86, 302);
vertex(120, 304);
vertex(129, 283);
vertex(123, 243);
vertex(121, 133);
vertex(42, 122);
vertex(10, 245);
endShape(CLOSE);
beginShape();
fill(112,112,112);
vertex(64, 308);
vertex(80, 280); // tip
vertex(86, 302);
endShape(CLOSE);
beginShape();
fill(144,143,143);
vertex(80, 280);
vertex(108, 263);
vertex(118, 238);
vertex(122, 137);
vertex(213, 42);
vertex(293, 48);
vertex(264, 29);
vertex(192, 36);
vertex(109, 86);
vertex(94, 124);
vertex(83, 242);
vertex(50, 292);
vertex(48, 304);
vertex(64, 308);
endShape(CLOSE);
beginShape();
fill(155,152,152);
vertex(24, 170);
vertex(38, 124);
vertex(0, 64);
vertex(0, 125);
endShape(CLOSE);
beginShape();
fill(173,172,172);
vertex(38, 124);
vertex(10, 244);
vertex(30, 270);
vertex(48, 240);
vertex(54, 130);
endShape(CLOSE);
//neck
beginShape();
fill(155,152,152);
vertex(216, 559);
vertex(212, 464);
vertex(175, 509);
vertex(118, 540);
vertex(41, 543);
vertex(0, 600);
endShape(CLOSE);
//cheek shade
beginShape();
fill(220,220,220);
vertex(250, 250);// cheek insert
vertex(120, 304);
vertex(129, 283);
vertex(123, 243);
endShape(CLOSE);
//cheek shade 2
beginShape();
fill(198,199,197);
vertex(250, 250);// cheek insert
vertex(120, 304);
vertex(145, 400);
vertex(270, 400);
vertex(176, 505);
endShape(CLOSE);
//cheek shade 2
beginShape();
fill(198,199,197);
vertex(250, 250);// cheek insert
vertex(120, 304);
vertex(145, 400);
vertex(270, 400);
vertex(176, 505);
endShape(CLOSE);
//cheek shade 3
beginShape();
fill(198,199,197);
vertex(308, 261);
vertex(289, 363);
vertex(270, 400);
vertex(127, 422);
// cheek insert
vertex(200, 400);
vertex(275, 128); // eye edge
endShape(CLOSE);
//Embellishments
strokeWeight(2.5);
strokeCap(ROUND);
line(0, 0, 109, 86);
line(0, 600, 97, 440);
fill("white");
stroke(0, 0, 0);
bezier(200, 200, 100, 100, 90, 90, 15, 80);
//hair
fill(91,76,40);
stroke(0, 0, 0);
bezier(400, 200, 400, 400, 500, 300, 350, 400);
fill(91,76,40);
stroke(0, 0, 0);
bezier(400, 200, 400, 400, 300, 300, 300, 500);
fill(150,126,69);
stroke(0, 0, 0);
bezier(400, 200, 600, 10, 300, 150, 200, 0);
fill(120,114,97);
stroke("brown");
bezier(300, 0, 600, 10, 200, 150, 100, 0);
fill(120,114,97);
stroke(0, 0, 0);
bezier(300, 0, 600, 10, 300, 50, 400, 500);
}
In this project I wanted to create an abstracted face with vertex points that all connect to one another. Through the course of creating the face however, relying on a effective connectivity program that could input the connection between points at random would be more efficient than manually inputing every value.