jamieh-Project-01-Face

sketch

function setup() {
    x = 500;
    y = 350;

 //Distance from centre
    dist = 31

    createCanvas(x, y);
    background(235, 252, 255);

//Hair 
	//Back (dark)
    fill(0, 0, 0);
    rect(168.5, 179, 159, 300);

//Shirt
	noStroke();
	fill(255, 210, 227);
	quad(145, 290, 355, 290, 365, y, 135, y);

//Neck
	noStroke();
    fill(245, 230, 203);
    rect(x/2-20, 260, 40, 30);
    quad(230, 260, 270, 260, 252, 280, 248, 280);

 //Face shape
    noStroke();
    fill(255, 244, 223);
    ellipse(x/2, y/2, 140, 180)

   
 //Hair
	//Side
	c = 12
	d = 125
	fill(51, 25, 0);
    quad(200-c, 120, 210-c, 120, 190-c, 300, 185-c, 175);
    quad(188+d, 118, 200+d, 165, 190+d, 300, 185+d, 165)
 	
    stroke(51, 25, 0);
    strokeWeight(10);
    line(306, 120, 315, 170);

 //Mouth
    noStroke();
    fill(256, 256, 256);
    ellipse(x/2, y/2+40, 75, 50);
    fill(255, 244, 223);
    ellipse(x/2, y/2+15, 120, 70);

 //Lip colour
    noFill();
    stroke(255, 219, 228);
    strokeWeight(2);
    arc(x/2, y/2+42, 75, 45, 0, PI);

 //Cheeks
    stroke(252, 229, 238);
    strokeWeight(2);
    line(x/2-45, y/2+6, x/2-52, y/2+10);
    line(x/2-37, y/2+6, x/2-44, y/2+10);
    line(x/2-29, y/2+6, x/2-36, y/2+10);

    line(x/2+47, y/2+6, x/2+40, y/2+10);
    line(x/2+39, y/2+6, x/2+32, y/2+10);
    line(x/2+31, y/2+6, x/2+24, y/2+10);

 //Eyebrows
    fill(0, 0, 0)
    stroke(0, 0, 0);
    strokeWeight(1.5);
    arc(x/2-dist, y/2-7, 50, 50, PI+QUARTER_PI, TWO_PI-QUARTER_PI);
    arc(x/2+dist, y/2-7, 50, 50, PI+QUARTER_PI, TWO_PI-QUARTER_PI);
    
    noStroke();
    fill(255, 244, 223);
    rect(x/2-dist-18.5, y/2-29, dist*3.2, 12)

 //Eye
    noStroke();
    fill(256, 256, 256);
    ellipse(x/2-dist, y/2-10, 27, 25);
    ellipse(x/2+dist, y/2-10, 27, 25);

//Eyeball
	//Outer
    noStroke();
    fill(153, 90, 0);
    ellipse(x/2-dist, y/2-10, 17, 17);
    ellipse(x/2+dist, y/2-10, 17, 17);

    //Middle
    noStroke();
    fill(102, 51, 0);
    ellipse(x/2-dist, y/2-10, 11, 11);
    ellipse(x/2+dist, y/2-10, 11, 11);

    //Inner
    noStroke();
    fill(51, 25, 0);
    ellipse(x/2-dist, y/2-10, 9, 9);
    ellipse(x/2+dist, y/2-10, 9, 9);

    //Inner
    noStroke();
    fill(256, 256, 256);
    ellipse(x/2-dist-4, y/2-10-4, 4, 4);
    ellipse(x/2+dist-4, y/2-10-4, 4, 4);

    //Smile Eyes
	fill(255, 244, 223);
	ellipse(x/2-dist, y/2+0.5, 30, 10);
	ellipse(x/2+dist, y/2+0.5, 30, 10);

    //Eyelash
    noFill();
    stroke(0, 0, 0);
    strokeWeight(0.75);
    arc(x/2-dist, y/2-10, 25, 25, PI+QUARTER_PI, TWO_PI-QUARTER_PI);
    arc(x/2+dist, y/2-10, 25, 25, PI+QUARTER_PI, TWO_PI-QUARTER_PI);

    noFill();
    stroke(0, 0, 0);
    strokeWeight(0.5);
    arc(x/2-dist-6, y/2-25, 8, 8, HALF_PI, PI);
    arc(x/2-dist-4, y/2-24, 5, 5, HALF_PI, PI);
    arc(x/2+dist+6, y/2-25, 8, 8, 0, HALF_PI);
    arc(x/2+dist+4, y/2-24, 5, 5, 0, HALF_PI);

//Nose
    stroke(252, 234, 208);
    strokeWeight(3);
    line(x/2, y/2-3, x/2+4, y/2+25); 
    strokeWeight(1.5);
    line(x/2+4, y/2+25, x/2-3, y/2+29);

    //Nose shadow
    stroke(255, 238, 215);
    strokeWeight(4);
    line(x/2+4, y/2-3, x/2+8, y/2+25); 
    strokeWeight(2);
    line(x/2+8, y/2+25, x/2, y/2+29);

    //Nostril
    strokeWeight(3);
    line(x/2-8, y/2+24, x/2-11, y/2+28);
    line(x/2-8, y/2+24, x/2-11, y/2+28);


//Hair
    noStroke();
    fill(51, 25, 0);
 	
 	//Sides
 	quad(217, 110, 290, 144, 311, 185, 311, 121);
 	quad(195, 112, 217, 110, 192, 160, 180, 186);
 	//fill(256, 256, 256);
 	
 	//Fringe
 	quad(186, 122, 210, 96, 240, 85, 282, 94);
 	quad(282, 94, 310, 115, 290, 144, 210, 105);
 	
 	//Top
 	noFill();
 	stroke(51, 25, 0);
 	strokeWeight(14);
 	arc(249, 167, 138, 160, PI, 0)

 	//front hair
 	stroke(51, 25, 0);
 	strokeWeight(20);
 	bezier(225, 92, 385, 70, 297, 330, 330, 340);
 	bezier(215, 100, 135, 240, 210, 350, 170, 345);

 	strokeWeight(5);
	bezier(211.5, 105, 160, 240, 215, 350, 178, 348);
  	bezier(190, 120, 135, 240, 200, 340, 165, 345);
 	bezier(215, 100, 372, 120, 290, 350, 330, 345);
 	bezier(225, 92, 395, 65, 297, 340, 330, 335);


	
	
 	


}

function draw() {
}

Looking back at my code, I only used a few geometries throughout the entire process, yet I was able to make a self-portrait. The
hardest part of the process was pinpointing the coordinates for the shapes, which got harder especially with quad that required 8 blanks to be filled and arc that required the radians.

Leave a Reply