Sean Meng-project-01-Face

hmeng-project 1

//Sean(Han) Meng
//Section C
//hmeng@andrew.cmu.edu
//Project-01-self portrait

function setup() {
    createCanvas(600, 600);
    background(250);
 
}

function draw() {   
//BackGround
    stroke(229, 172, 211);
    strokeWeight(1);
    point(0, 300);
    point(250, 250);
    point(600, 450);

    noFill();
    strokeWeight(30);
    beginShape();
    vertex(0, 300);
    quadraticVertex(250, 250, 600, 450);
    endShape();

    stroke(89, 0, 89);
    strokeWeight(1);
    point(0, 500);
    point(300, 400);
    point(620, 100);

    noFill();
    strokeWeight(18);
    beginShape();
    vertex(0, 500);
    quadraticVertex(300, 400, 620, 100);
    endShape();

    stroke(255, 235, 50);
    strokeWeight(1);
    point(0, 360);
    point(300, 400);
    point(620, 600);

    noFill();
    strokeWeight(20);
    beginShape();
    vertex(0, 360);
    quadraticVertex(300, 400, 620, 600);
    endShape();

//Body
    stroke(0, 0, 103);
    fill(0, 0, 73);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(165, 365);
    vertex(140, 400);
    vertex(130, 600);
    vertex(450, 600);
    vertex(423, 400);
    vertex(380, 365);
    endShape();  

//Hoodie
    stroke(150);
    fill(150);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(205, 295); 
    vertex(175, 330); 
    vertex(260, 370);
    vertex(270, 370);
    vertex(290, 370);
    vertex(385, 330);
    vertex(350, 295);
    endShape(); 

//Neck
    stroke(230,214,169);
    fill(230,214,169);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(250, 330); 
    vertex(245, 370); 
    vertex(310, 370);
    vertex(305, 330);
    endShape();  

//Hoodie out
    stroke(210);
    fill(210);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(270, 360);
    vertex(175, 330); 
    vertex(165, 365); 
    vertex(272, 370)
    endShape();  

    stroke(210);
    fill(210);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(385, 330);
    vertex(300, 355);
    vertex(295, 370);
    vertex(390, 370);
    vertex(385, 330);
    endShape(); 

 //Left Ear
    stroke(240,224,179);
    fill(240,224,179);
    strokeWeight(1);
    strokeJoin(ROUND);
    beginShape();
    vertex(200, 240);
    vertex(187, 240);
    vertex(180, 260);
    vertex(200, 290);
    vertex(215, 300);
    vertex(215, 260);
    endShape();

//Right Ear
    stroke(240,224,179);
    fill(240,224,179);
    strokeWeight(1);
    strokeJoin(ROUND);
    beginShape();
    vertex(360, 240);
    vertex(364, 240);
    vertex(370, 260);
    vertex(350, 290);
    vertex(345, 300);
    vertex(215, 260);
    endShape();

 //Face
    stroke(255,244,189);
    fill(255,244,189);
    strokeWeight(3);
    strokeJoin(ROUND);
    beginShape();
    vertex(215, 270); 
    vertex(215, 310);  
    vertex(250, 335);  
    vertex(267, 342); 
    vertex(290, 345);
    vertex(337, 298); 
    vertex(337, 225);   
    vertex(215, 225); 
    endShape();

 //Hair
    stroke(0);
    fill(0);
    strokeWeight(4);
    strokeJoin(ROUND);
    beginShape();
    vertex(202.5, 262.5);
    vertex(187.5, 220);
    vertex(200, 150);
    vertex(270, 127.5);
    vertex(337.5, 150);
    vertex(360, 202.5);
    vertex(348, 263.25);
    vertex(342, 265.25);
    vertex(337.5, 225);
    vertex(318, 231);
    vertex(300, 225);
    vertex(275, 235);
    vertex(260, 230);
    vertex(250, 235);
    vertex(217, 230);
    vertex(215, 270);
    vertex(202.5, 262.5);
    endShape();

//Glasses
    strokeWeight(3);
    fill(255);
    arc(245, 265, 42, 37, 0, PI + PI);
    strokeWeight(3);
    fill(255);
    arc(305, 265, 42, 37, 0, PI + PI);
    stroke(150);
    curve(266, 263, 266, 260, 280, 260, 300, 263);
    stroke(0);
    line(215, 260, 225, 260);
    line(325, 260, 339, 260);

//Nose
    strokeWeight(2);
    line(275, 270, 270, 300);
    line(270, 300, 275, 300);

//Mouth
    noStroke();
    fill(240,214,159);
    triangle(260, 325, 293, 325, 270, 320);


//Arms
    stroke(50, 50, 150);
    strokeWeight(3);
    line(175, 440, 170, 600);
    line(390, 440, 410, 600);

//Strings
    fill(255);
    stroke(255);
    strokeWeight(1);
    rect(260, 370, 1, 80);
    rect(300, 370, 1, 75);
    rect(259, 450, 4, 15);
    rect(299, 445, 4, 15);
//graphic
    fill(230);
    strokeWeight(5);
    stroke(10, 60, 130);
    circle(345, 460, 40);

}

When I draw myself I found it very interesting to represent my own features such as hairstyle and glasses using abstract geometries and shapes. And drawing using coding is a brand new workflow that requires a different logic from drawing with hands.

Leave a Reply