// Doo Won Nam
// 15-104 :: 1 Section B
// dnam@andrew.cmu.edu
// Assignment-portrait
function setup() {
createCanvas(268, 293);
background(248, 173, 133);
noStroke();
fill("black");
rect(0, 0, 268, 111);
fill("black");
rect(245, 111, 12, 70);
fill("black");
rect(2, 121, 86, 22);
fill("black");
rect(134, 121, 88, 22);
fill("black");
ellipse(40, 163, 20, 20);
fill("black");
ellipse(175, 163, 20, 20);
fill(211, 149, 116);
triangle(78, 210, 108, 150, 98, 210);
fill("pink");
triangle(98, 210, 108, 150, 127, 210);
fill(240, 162, 150);
rect(58, 240, 124, 10);
fill(211, 149, 116);
rect(58, 250, 124, 10);
}
function draw() {
if (millis() > 2000) {
osc.stop();
noLoop();
}
}
I wanted to create a pixel head portrait of myself using my limited knowledge of P5JS. I used the color schemes to show shadow and light.