Lan Wei-Project-01-Face

sketch

function setup() {
    createCanvas(600, 600);
    background(68, 130, 128);
    strokeWeight(3);
}

function draw() {
    //hat
    fill(196, 42, 42);
    stroke(196, 42, 42);
    ellipse(300, 260, 205, 195);

    //quilt
    ellipse(300, 570, 320, 500);
    stroke(232, 139, 139);
    push();
    strokeWeight(40);
    beginShape();
    curveVertex(240, 350);
    curveVertex(240, 290);
    curveVertex(230, 370);
    curveVertex(350, 440);
    curveVertex(360, 470);
    curveVertex(350, 500);
    curveVertex(330, 600);
    curveVertex(330, 700);
    endShape();
    pop();

    //face
    fill(245, 230, 120);
    stroke(245, 230, 120);
    beginShape();
    curveVertex(220, 100);
    curveVertex(220, 240);
    curveVertex(230, 350);
    curveVertex(300, 400);
    curveVertex(370, 350);
    curveVertex(380, 240);
    curveVertex(380, 100);
    endShape();
    push();
    fill(232, 169, 132);
    stroke(232, 169, 132);
    ellipse(250, 360, 20, 20);
    ellipse(350, 360, 20, 20);
    pop();

    //glasses
    push();
    strokeWeight(1)
    stroke(0);
    noFill()
    ellipse(250, 313, 70, 73);
    ellipse(350, 313, 70, 73);
    line(285, 313, 315, 313);
    pop();

    //eyebrow
    stroke(0);
    push();
    strokeWeight(5)
    line(230, 270, 270, 273);
    line(370, 268, 330, 273);
    pop();

    //eye
    line(220, 320, 270, 330);
    push();
    translate(350, 325);
    fill(255);
    strokeWeight(2);
    rotate(radians(-7));
    ellipse(0, 0, 50, 7);
    strokeWeight(3);
    ellipse(-2, 0, 5, 5);
    pop();

    //mouth
    fill(250, 70, 70);
    stroke(250, 70, 70);
    triangle(300, 355, 293, 375, 307, 375);
    fill(255);
    stroke(255);
    triangle(300, 355, 299, 357, 301, 357);

    //hair
    fill(0);
    stroke(0);
    quad(220, 241, 170, 330, 230, 370, 230, 350);
    quad(380, 241, 370, 241, 370, 370, 450, 330);

    //hat part 2
    fill(207, 71, 71);
    stroke(207, 71, 71);
    ellipse(300, 247, 175, 45);
}

Leave a Reply