For my self portrait, I wanted to play with the simple shape tools I understood in this program to create shadows, so that I could block out more of the details on my face in an interesting way (as opposed to outlining them with the stoke). When creating this, I learned that the program runs a lot like a physical canvas in the sense that everything is layered on top of each other. It reminds me of painting, since objects/shapes that I want in front of everything else come last in the code and I have to direct which color each one is, even if that color has been used previously in the artwork.
function setup() {
createCanvas(620, 620);
background(86, 116, 159);
//text("p5.min.js vers 0.7.1 test.", 10, 15);
}
function draw() {
//colors
s = color(253, 217, 147)
l = color(255, 242, 216)
d = color(233, 180, 90)
g = color(98, 187, 70)
fill(s);
noStroke();
ellipse(443, 251, 724, 785)
fill(l)
rect(336, -70, 352, 697)
triangle(244, 425, 336, 207, 336, 425)
fill(s);
triangle(336, 425, 344, 380, 391, 425)
fill(d);
triangle(224, 314, 260, 341, 285, 292)
//eye-01
fill(d)
ellipse(196, 256, 168, 98)
fill(255)
ellipse(205, 251, 168, 98)
fill(g)
ellipse(239, 244, 73, 73)
//eye-02
fill(d)
ellipse(473, 256, 168, 98)
fill(255)
ellipse(482, 251, 168, 98)
fill(0, 0, 114)
ellipse(529, 244, 40, 40)
//eyelids
fill(s)
rect(121, 184, 193, 46)
fill(l)
rect(391, 184, 193, 46)
//eyebrow
fill(s);
triangle(336, 204, 467, 158, 596, 195)
//lips
fill(137, 183, 226)
triangle(262, 499, 336, 466, 336, 500)
fill(182, 215, 241)
triangle(336, 466, 336, 500, 438, 500)
fill(86, 116, 159)
triangle(262, 499, 336, 543, 336, 500)
fill(114, 155, 204)
triangle(336, 500, 336, 543, 438, 500)
}