Bo Yang-Project-01-Face

In the beginning, I want to draw a little girl with fringe. However, I’m not a good painter. It is more like a cartoon here. And I love the two colors I made it.

Bo-sketch

/*
    Bo Yang
    byang2@andrew.cmu.edu
    Section A
    This program draws a self portrait.
*/

function setup() {
    createCanvas(300, 300);
}

function draw() {
    background(180,60,80);
    if (mouseX < (width / 2)) {
        background(60, 100, 150);
    }
  
    //body
    line(180, 180, 225, 300); 
    line(120,180,75,300);
  
    //face
    fill(255,200,200);
    ellipse(150, 150, 120, 100); {
      
    //left eye
    fill(0);
    noFill();
    strokeWeight(7.0);
    strokeCap(ROUND);
    beginShape();
    curveVertex(100, 250);
    curveVertex(135, 150);
    curveVertex(115, 150);
    curveVertex(143, 250);
    endShape();
      
    //right eye
    strokeJoin(MITER);
    beginShape();
    vertex(180, 135);
    vertex(170, 143);
    vertex(180, 150);
    endShape();
      
    //nose
    point(150, 160);
      
    //mouth
    fill(255, 0, 0);
    arc(150, 175, 15, 25, 0, PI, CHORD);
      
    //hair
    noFill()
    arc(150, 150, 160, 180, 84, 76, OPEN);
    line(185, 190, 215, 201);
    line(95, 210, 109, 192);
      
    //earring
    fill(255, 204, 0);
    triangle(80, 155, 99, 155, 91, 176);
    triangle(205, 155, 224, 155, 215, 176);
      
    //headwear
    ellipseMode(RADIUS); 
    fill(180, 200, 50); 
    ellipse(200, 90, 28, 28); 

    ellipseMode(CENTER); 
    fill(255, 204, 0); 
    ellipse(200, 90, 25, 25); 
  }
}

Leave a Reply