// Using p5.js, draw a self-portrait using at least 10 graphic elements,
//such as lines, quads, ellipses, etc. You may use any graphical primitives you please,
// with the exception that you may not use drawing functions that require the loading of external assets (e.g. images, fonts).
//Experiment with the use of at least 2 colors in addition to the background color.
function setup() {
createCanvas(500, 550);
background(150, 191, 215);
}
function draw() {
strokeWeight(0);
fill(31, 29, 19);
rect(110, 150, 130, 350, 800, 20, 70, 40); //left hair
rect(255,150, 130, 350, 800, 70, 40, 70); // right hair
fill (218, 197, 150);
rect(150, 100, 200, 250, 20, 30, 80,80); //head
fill(31, 29, 19);
rect(100, 50, 150, 180, 800, 70, 80, 40); // left bang
rect(250, 50, 150, 180, 800, 70, 40, 80); // right bang
arc(200, 250, 40, 30, PI, 0); // left eye
arc(300, 250, 40, 30, PI, 0); // right eye
rect(158, 50, 185, 95); //top hair
fill (218, 197, 150);
ellipse(200, 255, 40, 20); // left eye skin color
ellipse(300, 255, 40, 20); //right eye skin color
fill (255, 176, 222, 80);
ellipse(170, 280, 90, 90); //left blush
ellipse(325, 280, 90, 90); // right blush
fill(200, 100, 73);
ellipse(250, 280, 40, 20); //nose
fill (218, 197, 150);
rect(220, 310, 60, 100); // neck
fill(225);
rect(150, 380, 200, 250, 80, 80, 0,0); // shirt
fill (218, 197, 150);
ellipse(250, 375, 60, 60); //neckline
fill(0);
arc(250, 300, 50, 50, 0, PI); //smile!
strokeWeight(3); // necklace
stroke(192, 169, 70);
line(220, 380, 250, 420);
line(280, 380, 250, 420);
noStroke();
fill(120, 190, 0);
ellipse(250, 430, 10, 20); // jade
noLoop();
}
I struggled most with finding the intended location of functions on the x and y axis. I did a lot of guess and checking until I was satisfied with the position, but I hope I can be more intentional in future projects.