Project 1 – My Self Portrait

portrait
//Flora Xia Section B
function setup() {
    createCanvas(200, 200);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    background(255,204,229)
    fill(255,153,204)//medpink
    noStroke()
    square(0,0,70)
    fill(255,102,178,150)
    rect(50,50,140,90)
    fill(255,153,199,200)
    triangle(100,100,10,150,50,170)
    //end of background
    //hair brown
    stroke(102,51,0)
    fill(102,51,0)
    ellipse(100,120,130,180)
    rect(38,140,125,80)
    //face shape
    noStroke()
    fill(222,184,135)
    ellipse(100,110, 105,140)
    //cheeks
    noStroke()
    fill(205,133,63,150)
    triangle(50,120,60,150,70,152)
    triangle(150,120,140,150,130,152)
    //nose
    fill(255,204,153, 150)
    circle(100,135,10)
    circle(105,137,5)
    circle(95,137,5)
    //nose bridge
    noFill()
    stroke(255,204,153,150)
    arc(95,120,5,35,4.71,1.57)
    //hair front
    stroke(255,250,204)
    fill(102,51,0)
    arc(136,45,75,120,1.75,3.1415)
    arc(65,45,75,120,0,1.5)
    noStroke()
    rect(78,35,45,10)
    triangle(100,30,50,150,55,60)
    triangle(90,35,150,150,140,55)
    rect(45,73,10,80)
    rect(142,73,14,80)
    //hair pin
    fill(143,188,143)
    circle(138,70,7)
    fill(255,215,0)
    circle(143,70,7)
    circle(140,65,7)
    circle(134,66,7)
    circle(134,72,7)
    circle(140,74,7)
    //eye
    stroke(0)
    fill(255,255,255,150)
    arc(75,110,20,7,3.1415,0)
    arc(125,110,20,7,3.1415,0)
    //pupils
	fill(102,51,0)
    stroke(0,0,0,150)
    circle(75,110,7)
    circle(125,110,7)
    fill(0,0,0,200)
    noStroke()
    circle(75,110,3)
    circle(125,110,3)
    fill(255)
    circle(74,109,1)
    circle(124,109,1)
    ellipse(126,111,2,1)
    ellipse(76,111,2,1)
    //lips
    noFill()
    stroke(255,0,0,50)
    arc(95,150,10,5,3.1415,0)
    arc(105,150,10,5,3.1415,0)
    arc(100,155,25,5, 0,3.1415)
    line(89,152,111,152)
    //overlay
    noStroke()
    fill(219,112,147,50)
    triangle(199,199,3,3,75,150)
    circle(150,50,100)
    quad(0,150,20,199,50,180,60,199)


}

flowers are cute

Leave a Reply