//Victor Tavarez
//Section D
//vtavarez@andrew.cmu.edu
//project-01
function setup() {
createCanvas(500, 500);
}
function draw() {
background(196,53,255);
//head
noStroke();
fill("black"); //hair
arc(230,190,100,100, PI,PI/100);
fill(255,153,0); //temple
quad(190,190,210,180,210,200,190,200);
fill(250,120,30); //forehead
rect(200,170,80,30,10);
fill(255,190,10); //lowerTemple
rect(190,200,70,20);
fill(255,190,90); //chin
quad(200,200,270,200,260,260,215,260);
fill(255,160,120);
quad(190,220,230,220,215,260,190,240); //left cheek
fill(255,160,90);
quad(250,220,280,220,280,240,260,260);
//nose
noStroke();
fill(205,200,120);
arc(235,230,10,10,PI/10,PI); //left nostril
fill(260,175,10);// nose tip
ellipse(242,232,12,12);
fill(255,200,200); //bridge
quad(230,220,235,230,245,230,250,220);
//ears
fill(255,160,200);
quad(178,187,190,190,190,220,180,210,10);
//Glasses
stroke(10);
strokeWeight(5);
fill(153,153,255);
rect(200,200,30,20,5); //left
fill(154,160,255)
rect(250,200,30,20,5); //right
noFill();
arc(240,210,19,10,PI,0);
line(190,200,200,200);
//lips
noStroke();
fill("red");
triangle(225,250,250,250,240,252);
triangle(230,250,235,247,245,250);
triangle(240,250,242,247,250,250);
noLoop(); //saves computing power
}
Working on this assignment I became better acquainted with some of the P5.js functionalities and limitation. I particularly struggled with layering the code to present itself in the way I needed to. I enjoyed the process of designing what my image would look like, but was disappointed with my limited knowledge to execute the idea. Overall the project was a great learning experience and I am happy to be able to express myself through simple lines of code.