I first drew out the lines in illustrator and then use java commands to build the geometric shapes and fill in colors. The buildings in the background represents my major, architecture.
//Sean Meng
//Section B
//hmeng@andrew.cmu.edu
//Assignment1
function setup() {
createCanvas(600, 600);
background(0);
text("p5.js vers 0.7.1 test.", 10, 15);
}
function draw() {
fill(255, 255, 255)
rect(0, 0, 300, 600)
//ears
fill(225, 197, 164)
ellipse(380, 330, 20, 40)
strokeWeight(0)
ellipse(220, 330, 20, 40)
//face
strokeWeight(0)
fill(236, 212, 190)
rect(220, 250, 160, 100)
triangle(220, 350, 300, 350, 300, 420)
triangle(220, 350, 240, 390, 300, 420)
quad(300, 420, 300, 350, 380, 350, 340, 400)
//hair
fill(0)
triangle(205, 250, 290, 275, 405, 250)
triangle(205, 250, 230, 220, 300, 220)
triangle(230, 220, 265, 200, 300, 220)
rect(265, 200, 60, 30)
triangle(265, 200, 300, 195, 300, 220)
triangle(205, 250, 300, 220, 300, 250)
rect(370, 240, 10, 70)
//glasses
fill(0)
ellipse(255, 315, 60, 60)
fill(245, 245, 245)
ellipse(255, 315, 53, 53)
fill(0)
ellipse(335, 315, 60, 60)
fill(245, 245, 245)
ellipse(335, 315, 53, 53)
strokeWeight(1)
fill(200)
rect(283.5, 309, 22, 3)
rect(219, 309, 7, 3)
rect(364, 309, 16, 3)
//nose
strokeWeight(2)
line(290, 315, 290, 350)
line(290, 350, 300, 350)
//mouth
fill(220, 145, 140)
rect(280, 380, 30, 5)
//background buildings
strokeWeight(0)
fill(153, 138, 138)
rect(370, 470, 50, 160)
rect(480, 500, 80, 100)
rect(395, 440, 10, 40)
fill(136, 115, 117)
rect(400, 520, 120, 80)
//backgrounds 2
strokeWeight(12)
triangle(60, 170, 130, 170, 130, 50)
}