Romi Jin – Project-01-Face

romi-selfportrait

/* Romi Jin 
Section B 
rsjin@andrew.cmu.edu 
Project-01 */

function setup() {
    createCanvas(500, 1000);
    background(252, 221, 215);
    //background(255, 240, 245);
}

function draw() {

    //right side of hair
    fill(106, 59, 51);
    noStroke();
    beginShape();

    curveVertex(380,219);
    curveVertex(371,200);
    curveVertex(352,172);
    curveVertex(336,153);
    curveVertex(323,141);
    curveVertex(311,136);
    curveVertex(324,128);
    curveVertex(338,119);
    curveVertex(350,102);
    curveVertex(353,105);
    curveVertex(366,118);
    curveVertex(391,157);
    curveVertex(411,195);
    curveVertex(417,213);
    curveVertex(421,229);
    curveVertex(422,247);
    curveVertex(422,261);
    curveVertex(423,283);
    curveVertex(425,309);
    curveVertex(427,331);
    curveVertex(429,349);
    curveVertex(423,368);
    curveVertex(415,387);
    curveVertex(405,399);
    curveVertex(391,413);
    curveVertex(384,418);
    endShape(CLOSE);


     //shirt
    fill(255,255,255);
    stroke(220,220,220);
    strokeWeight(1);
    beginShape();
    vertex(333,493);
    vertex(351,502);
    vertex(367,500);
    vertex(423,504);
    vertex(453,525);
    vertex(500,538);
    vertex(500,793);
    vertex(462,749);
    vertex(468,1000);
    vertex(0,1000);
    vertex(0,561);
    vertex(11,558);
    vertex(333,493);
    endShape(CLOSE);

    //shirt lines
    noFill();
    stroke(220,220,220);
    strokeWeight(1);
    triangle(333, 493, 308, 605, 383, 624);

    noFill();
    stroke(220,220,220);
    strokeWeight(1);
    beginShape();
    vertex(308,605);
    vertex(271,850);
    vertex(286,1000);
    vertex(237,1000);
    vertex(229,852);
    vertex(254,659);
    endShape(CLOSE);

    stroke(220,220,220);
    strokeWeight(1);
    line(199,713,241,758);

    stroke(220,220,220);
    strokeWeight(2);
    line(270,686,267,702);

    noFill();
    stroke(220,220,220);
    strokeWeight(1);
    ellipse(255,886,18,18);

    //neck
    fill(244, 224, 217);
    noStroke();
    beginShape();
    vertex(333,493);
    vertex(308,605);
    vertex(254,659);
    vertex(241,758);
    vertex(199,713);
    vertex(199,490);
    vertex(333,493);
    endShape(CLOSE);

    //neckshadow
    fill(221,205,202);
    noStroke();
    triangle(253,517,211,640,199,490);

    //face shape
    fill(255, 233, 224);
    noStroke();
    ellipse(271, 320, 260, 395);

    //facial features

    //beauty mark
    stroke(139,94,60);
    strokeWeight(4);
    point(200,334);

    //eyebrows
    //left
    fill(68,50,35);
    noStroke();
    beginShape();
    curveVertex(246,233);
    curveVertex(228,230);
    curveVertex(208,229);
    curveVertex(189,231);
    curveVertex(178,238);
    curveVertex(180,247);
    curveVertex(194,246);
    curveVertex(217,246);
    curveVertex(238,247);
    curveVertex(250,245);
    endShape(CLOSE);
    //right
    fill(68,50,35);
    noStroke();
    beginShape();
    curveVertex(317,234);
    curveVertex(338,232);
    curveVertex(356,233);
    curveVertex(376,237);
    curveVertex(387,243);
    curveVertex(391,251);
    curveVertex(393,256);
    curveVertex(386,255);
    curveVertex(371,249);
    curveVertex(355,247);
    curveVertex(335,247);
    curveVertex(320,248);
    curveVertex(312,250);
    curveVertex(308,242);
    endShape(CLOSE);

    //eyes

    //outline
    //left
    fill(255);
    stroke(0);
    strokeWeight(.75)
    beginShape();
    curveVertex(238,295);
    curveVertex(238,295);
    curveVertex(236,291);
    curveVertex(233,287);
    curveVertex(228,283);
    curveVertex(221,280);
    curveVertex(211,279);
    curveVertex(201,279);
    curveVertex(190,282);
    curveVertex(182,286);
    curveVertex(177,289);
    curveVertex(179,292);
    curveVertex(184,299);
    curveVertex(193,303);
    curveVertex(201,305);
    curveVertex(210,306);
    curveVertex(217,304);
    curveVertex(226,301);
    curveVertex(233,299);
    curveVertex(238,295);
    endShape(CLOSE);
    //right
    fill(255);
    stroke(0);
    strokeWeight(.75)
    beginShape();
    curveVertex(312,297);
    curveVertex(312,297);
    curveVertex(319,287);
    curveVertex(330,282);
    curveVertex(343,280);
    curveVertex(354,282);
    curveVertex(363,286);
    curveVertex(370,292);
    curveVertex(373,295);
    curveVertex(367,300);
    curveVertex(359,302);
    curveVertex(351,305);
    curveVertex(344,306);
    curveVertex(333,305);
    curveVertex(327,304);
    curveVertex(320,300);
    endShape(CLOSE);

    //left
    stroke(96,57,19);
    strokeWeight(27);
    point(209,293);

    stroke(0);
    strokeWeight(15);
    point(209,293);

    stroke(255);
    strokeWeight(6);
    point(215,290);

    //right
    stroke(96,57,19);
    strokeWeight(26);
    point(341,293);

    stroke(0);
    strokeWeight(14);
    point(341,293);

    stroke(255);
    strokeWeight(6);
    point(347,290);

    noFill();
    stroke(0);
    strokeWeight(.5);
    beginShape();
    curveVertex(179,281);
    curveVertex(179,281);
    curveVertex(197,274);
    curveVertex(210,273);
    curveVertex(223,276);
    curveVertex(232,282);
    curveVertex(238,288);
    curveVertex(238,288);
    endShape();

    noFill();
    stroke(0);
    strokeWeight(.5);
    beginShape();
    curveVertex(312,289);
    curveVertex(312,289);
    curveVertex(321,281);
    curveVertex(332,277);
    curveVertex(347,276);
    curveVertex(360,279);
    curveVertex(375,290);
    curveVertex(375,290);
    endShape();

    //nose
    noFill();
    stroke(0);
    strokeWeight(1);
    beginShape();
    curveVertex(253,342);
    curveVertex(253,342);
    curveVertex(244,355);
    curveVertex(241,367);
    curveVertex(248,383);
    curveVertex(260,379);
    curveVertex(261,372);
    curveVertex(270,375);
    curveVertex(279,383);
    curveVertex(289,378);
    curveVertex(301,373);
    curveVertex(301,383);
    curveVertex(312,380);
    curveVertex(314,369);
    curveVertex(309,353);
    curveVertex(304,342);
    curveVertex(304,342);
    endShape();

    //lips
    fill(232,163,163);
    noStroke();
    beginShape();
    curveVertex(228,427);
    curveVertex(228,427);
    curveVertex(238,422);
    curveVertex(257,407);
    curveVertex(268,409);
    curveVertex(276,412);
    curveVertex(283,411);
    curveVertex(293,408);
    curveVertex(306,417);
    curveVertex(319,431);
    curveVertex(308,441);
    curveVertex(290,454);
    curveVertex(275,455);
    curveVertex(260,454);
    curveVertex(250,449);
    curveVertex(242,442);
    curveVertex(234,435);
    endShape(CLOSE);

    noFill();
    stroke(183,132,132);
    strokeWeight(1.5);
    beginShape();
    curveVertex(228,427);
    curveVertex(238,427);
    curveVertex(251,425);
    curveVertex(263,426);
    curveVertex(276,428);
    curveVertex(295,427);
    curveVertex(309,431);
    curveVertex(319,431);
    endShape();

    stroke(0);
    strokeWeight(.25);
    line(264,387,261,401);

    stroke(0);
    strokeWeight(.25);
    line(290,389,293,403);

    fill(244,223,220);
    noStroke();
    quad(278,388,269,403,277,408,286,403);

    //hair
    fill(150, 82, 61);
    noStroke();
    beginShape();
    curveVertex(347,79);
    curveVertex(342,74);
    curveVertex(338,68);
    curveVertex(327,61);
    curveVertex(315,57);
    curveVertex(312,57);
    curveVertex(301,54);
    curveVertex(285,54);
    curveVertex(226,71);
    curveVertex(142,137);
    curveVertex(81,249);
    curveVertex(70,315);
    curveVertex(57,368);
    curveVertex(38,427);
    curveVertex(19,499);
    curveVertex(11,563);
    curveVertex(26,671);
    curveVertex(51,729);
    curveVertex(82,825);
    curveVertex(91,848);
    curveVertex(109,887);
    curveVertex(109,823);
    curveVertex(139,850);
    curveVertex(142,890);
    curveVertex(164,861);
    curveVertex(172,814);
    curveVertex(196,846);
    curveVertex(258,868);
    curveVertex(219,828);
    curveVertex(204,793);
    curveVertex(198,751);
    curveVertex(210,648);
    curveVertex(211,544);
    curveVertex(203,507);
    curveVertex(199,490);
    curveVertex(180,380);
    curveVertex(171,320);
    curveVertex(191,230);
    curveVertex(236,163);
    curveVertex(289,138);
    curveVertex(309,138);
    curveVertex(323,125);
    curveVertex(330,132);
    curveVertex(336,127);
    curveVertex(347,119);
    curveVertex(352,110);
    curveVertex(352,108);
    curveVertex(354,91);
    endShape(CLOSE);

}

For this project, I wanted to code a realistic cartoon of my face, using a photo, drawing a simple outline in Illustrator, and extracting coordinates from there to save time of randomly guessing the positions of each component. I also used a light, pastel color palette according to the photo this was based on. It took a lot less time than I had thought it would and was a lot of fun!

Anthony Ra – Project01 – Face

sketch

/* Anthony Ra
Section A
ahra@andrew.cmu.edu
project_01 */


var r, g, b;

function setup() {
    createCanvas(600, 600);
    background(0);
    r = random(255);
    g = random(255);
    b = random(255);


}


function draw() {

  fill(r, g, b, 127);
  ellipse(310, 270, 195, 195);

/* glasses */
  stroke(250);
  strokeWeight(23);
  ellipse(310, 270, 195, 195);
  ellipse(591, 270, 195, 195);
;
/* right line of face */
  stroke(250);
  strokeWeight(10);
  point(210, 271);
  point(206, 323);
  point(213, 399);
  point(228, 475);
  point(260, 550);
  point(295, 600);

  noFill();
  beginShape();
  curveVertex(210, 271);
  curveVertex(210, 271);
  curveVertex(206, 323);
  curveVertex(213, 399);
  curveVertex(228, 475);
  curveVertex(260, 550);
  curveVertex(295, 600);
  curveVertex(295, 600);
  endShape();

/* right ear */
  stroke(250);
  strokeWeight(10);
  point(210, 271);
  point(188, 275);
  point(178, 288);
  point(177, 307);
  point(181, 330);
  point(187, 357);
  point(199, 386);
  point(201, 393);
  point(195, 405);

  noFill();
  beginShape();
  curveVertex(210, 271);
  curveVertex(210, 271);
  curveVertex(188, 275);
  curveVertex(178, 288);
  curveVertex(177, 307);
  curveVertex(181, 330);
  curveVertex(187, 357);
  curveVertex(199, 386);
  curveVertex(201, 393);
  curveVertex(195, 405);
  curveVertex(195, 406);
  endShape();

/* right eyebrow */
  stroke(250);
  strokeWeight(15);
  point(277, 239);
  point(320, 229);
  point(360, 229);
  point(379, 237);
  point(387, 246);

  noFill();
  beginShape();
  curveVertex(277, 239);
  curveVertex(277, 239);
  curveVertex(320, 229);
  curveVertex(360, 229);
  curveVertex(379, 237);
  curveVertex(387, 246);
  curveVertex(387, 246);
  endShape();

/* left eyebrow */
  stroke(250);
  strokeWeight(15);
  point(520, 246);
  point(530, 235);
  point(545, 230);
  point(581, 229);
  point(600, 232);

  noFill();
  beginShape();
  curveVertex(520, 246);
  curveVertex(520, 246);
  curveVertex(530, 235);
  curveVertex(545, 230);
  curveVertex(581, 229);
  curveVertex(600, 232);
  curveVertex(600, 232);
  endShape();

/* right nose */
  stroke(250);
  strokeWeight(10);
  point(373, 399);
  point(367, 384);
  point(370, 370);
  point(373, 355);

  noFill();
  beginShape();
  curveVertex(373, 399);
  curveVertex(373, 399);
  curveVertex(367, 384);
  curveVertex(370, 370);
  curveVertex(373, 355);
  curveVertex(373, 355);
  endShape();

/* left nose */
  stroke(250);
  strokeWeight(10);
  point(519, 413);
  point(531, 402);
  point(534, 391);
  point(532, 374);
  point(527, 361);
  point(516, 346);
  point(507, 324);

  noFill();
  beginShape();
  curveVertex(519, 413);
  curveVertex(519, 413);
  curveVertex(531, 402);
  curveVertex(534, 391);
  curveVertex(532, 374);
  curveVertex(527, 361);
  curveVertex(516, 346);
  curveVertex(507, 324);
  curveVertex(507, 324);
  endShape();

/* under nose */
  stroke(250);
  strokeWeight(10);
  point(425, 386);
  point(434, 391);
  point(440, 399);
  point(444, 404);
  point(457, 405);
  point(465, 398);
  point(475, 390);

  noFill();
  beginShape();
  curveVertex(425, 386);
  curveVertex(425, 386);
  curveVertex(434, 391);
  curveVertex(440, 399);
  curveVertex(444, 404);
  curveVertex(457, 405);
  curveVertex(465, 398);
  curveVertex(475, 390);
  curveVertex(475, 390);
  endShape();

/* mouth side */
  stroke(250);
  strokeWeight(12);
  point(330, 471);
  point(323, 485);
  point(322, 497);
  point(325, 509);

  noFill();
  beginShape();
  curveVertex(330, 471);
  curveVertex(330, 471);
  curveVertex(323, 485);
  curveVertex(322, 497);
  curveVertex(325, 509);
  curveVertex(325, 509);
  endShape();

/* mouth */
  stroke(250);
  strokeWeight(12);
  point(330, 471);
  point(391, 483);
  point(436, 488);
  point(475, 493);
  point(512, 498);

  noFill();
  beginShape();
  curveVertex(330, 471);
  curveVertex(330, 471);
  curveVertex(391, 483);
  curveVertex(436, 488);
  curveVertex(475, 493);
  curveVertex(512, 498);
  curveVertex(512, 498);
  endShape();

/* right eyebrow */
  stroke(250);
  strokeWeight(19);
  point(255, 161);
  point(292, 144);
  point(317, 139);
  point(351, 142);
  point(379, 151);

  noFill();
  beginShape();
  curveVertex(255, 161);
  curveVertex(255, 161);
  curveVertex(292, 144);
  curveVertex(317, 139);
  curveVertex(351, 142);
  curveVertex(379, 151);
  curveVertex(379, 151);
  endShape();

/* left eyebrow */
  stroke(250);
  strokeWeight(19);
  point(523, 161);
  point(556, 146);
  point(582, 143);
  point(600, 146);

  noFill();
  beginShape();
  curveVertex(523, 161);
  curveVertex(523, 161);
  curveVertex(556, 146);
  curveVertex(582, 143);
  curveVertex(600, 146);
  curveVertex(600, 146);
  endShape();

/* leftist stroke of hair */
  stroke(250);
  strokeWeight(10);
  point(257, 65);
  point(234, 89);
  point(221, 110);
  point(211 ,133);
  point(209, 151);
  point(209, 171);
  point(214, 189);

  noFill();
  beginShape();
  curveVertex(257, 65);
  curveVertex(257, 65);
  curveVertex(234, 89);
  curveVertex(221, 110);
  curveVertex(211 ,133);
  curveVertex(209, 151);
  curveVertex(209, 171);
  curveVertex(214, 189);
  curveVertex(214, 189);
  endShape();

/* second leftest strand of hair */
  stroke(250);
  strokeWeight(10);
  point(231, 65);
  point(243, 39);
  point(265, 18);
  point(289, 6);
  point(322, 0);
  point(365, 10);
  point(392, 25);
  point(412, 41);
  point(427, 61);
  point(442, 100);
  point(447, 132);
  point(447, 165);

  noFill();
  beginShape();
  curveVertex(231, 65);
  curveVertex(231, 65);
  curveVertex(243, 39);
  curveVertex(265, 18);
  curveVertex(289, 6);
  curveVertex(322, 0);
  curveVertex(365, 10);
  curveVertex(392, 25);
  curveVertex(412, 41);
  curveVertex(427, 61);
  curveVertex(442, 100);
  curveVertex(447, 132);
  curveVertex(447, 165);
  curveVertex(447, 165);
  endShape();

/* second rightest strand of hair */
  stroke(250);
  strokeWeight(10);
  point(466, 0);
  point(480, 17);
  point(491, 36);
  point(500, 58);
  point(509, 88);
  point(513, 111);
  point(514, 130);

  noFill();
  beginShape();
  curveVertex(466, 0);
  curveVertex(466, 0);
  curveVertex(480, 17);
  curveVertex(491, 36);
  curveVertex(500, 58);
  curveVertex(509, 88);
  curveVertex(513, 111);
  curveVertex(514, 130);
  curveVertex(514, 130);
  endShape();

/* rightest strand of hair */
  stroke(250);
  strokeWeight(10);
  point(573, 0);
  point(580, 14);
  point(588, 41);
  point(593, 69);
  point(592, 91);
  point(591, 112);
  point(586, 138);

  noFill();
  beginShape();
  curveVertex(573, 0);
  curveVertex(573, 0);
  curveVertex(580, 14);
  curveVertex(588, 41);
  curveVertex(593, 69);
  curveVertex(592, 91);
  curveVertex(591, 112);
  curveVertex(586, 138);
  curveVertex(586, 138);
  endShape();

/* eye */
  stroke(250);
  strokeWeight(9);
  ellipse(345, 240, 42, 24);
  ellipse(566, 243, 42, 24);

  stroke(250);
  strokeWeight(7);
  ellipse(409, 386, 30, 15);
  ellipse(493, 393, 34, 16);


  /* middle of glasses */
    stroke(250);
    strokeWeight(23);
    point(406, 239);
    point(427, 226);
    point(452, 220);
    point(474, 223);
    point(498, 236);

    noFill();
    beginShape();
    curveVertex(406, 239);
    curveVertex(406, 239);
    curveVertex(427, 226);
    curveVertex(452, 220);
    curveVertex(474, 223);
    curveVertex(498, 236);
    curveVertex(498, 236);
    endShape();

}

function mousePressed() {
  var d = dist(mouseX, mouseY, 310, 270);
  if (d < 100) {
    r = random(255);
    g = random(255);
    b = random(255);
  }
}

I have done many self-portrait oil paintings in the past couple years where minute details and influx of different shades and hues were a priority. For this assignment, I decided to take a minimalistic approach to this and include simply the lines that define my face (glasses, brows, nose, hair, etc.). This also expresses my simple nature and laid-back attitude.

The coding was largely used by plotting point coordinates and connecting those points to create a curve. Then, I implemented a mousePressed function where the lens changes color with every click in order for me to see the world differently.

Connor McGaffin – Project-01-Face

sketch

function setup() {
   createCanvas(600, 600);

}

function draw() {
background(255, 214, 89);
//shirt
	//dark blue
	fill(8,27,64);
	strokeWeight(0);
	rect(150, 450, 300, 200, 50);
	//neck
	fill(237,175,130);
	triangle(250,450,350,450,300,500);
	rect(250,425,100,25);
	//collar
	fill(36,45,64);
	triangle(300,500,250,430,230,450);
	triangle(300,500,350,430,370,450);
//hair
	fill(97,62,39);
	ellipse(300,150,300,200);
	ellipse(150,205,50,150);
	ellipse(450,205,50,150);
//head
	fill(237,186,149);
	triangle(300,450,150,400,450,400);
	rect(150,150,300,250);
	ellipse(150,295,50,80);
	ellipse(450,295,59,80);
	//more hair
	fill(97,62,39);
	ellipse(315,150,270,75);
	triangle(150,150,180,150,150,170);
	//eyebrows
	rect(200,215,60,15);
	rect(342,215,60,15);
	//nose
	fill(237,175,130);
	triangle(300,250,280,340,320,340);
	ellipse(300,335,40,40);
	//eyes
	fill(250);
	ellipse(230, 280, 80, 80);
	ellipse(370,280,80,80);
	fill(0);
	ellipse(230,280,30,30);
	ellipse(370,280,30,30);
	fill(237,186,149);
	//rect(200,230,200,15);
	//mouth
	fill(250);
	triangle(230,370,370,370,300,420);

	//mole
	strokeWeight(5);
	fill(98,63,39);
	point(330,447);
	//teeth
	line(260,390,300,390);
	//dimples
	noLoop();
	stroke(237,175,130);
	line(200,360,200,370);
	line(400,360,400,370);
	



}

Creating this self portrait was rather rewarding. I oftentimes struggled keeping track of the coordinates I was using, and I had to reorganize my code multiple times to sort this out. If I had more time, I would like to learn how to animate this portrait, just so that it feels more human and less static.

Rjpark – Project 01 – Face

rjpark_selfportrait

function setup() {
    createCanvas(600, 600);
    background(200, 180, 200);
}

function draw() {
    fill(85, 65, 45);
    noStroke();
    ellipse(300, 200, 320, 320); // hair //
    rect(140, 200, 320, 500);
    ellipse(160, 210, 50, 55); // left curls //
    ellipse(156, 240, 50, 55);
    ellipse(153, 270, 50, 55);
    ellipse(150, 300, 50, 55);
    ellipse(150, 330, 50, 55);
    ellipse(150, 360, 50, 55);
    ellipse(150, 390, 50, 55);
    ellipse(150, 420, 50, 55);
    ellipse(150, 450, 50, 55);
    ellipse(150, 480, 50, 55);
    ellipse(150, 510, 50, 55);
    ellipse(150, 540, 50, 55);
    ellipse(150, 570, 50, 55);
    ellipse(150, 600, 50, 55);
    ellipse(440, 210, 50, 55); // right curls //
    ellipse(444, 240, 50, 55);
    ellipse(447, 270, 50, 55);
    ellipse(450, 300, 50, 55);
    ellipse(450, 330, 50, 55);
    ellipse(450, 360, 50, 55);
    ellipse(450, 390, 50, 55);
    ellipse(450, 420, 50, 55);
    ellipse(450, 450, 50, 55);
    ellipse(450, 480, 50, 55);
    ellipse(450, 510, 50, 55);
    ellipse(450, 540, 50, 55);
    ellipse(450, 570, 50, 55);
    ellipse(450, 600, 50, 55);

    fill(200, 180, 200);
    noStroke();
    triangle(210, 50, 250, 45, 245, 70); // hair part //

    fill(240, 200, 160);
    noStroke();
    ellipse(300, 230, 240, 280); // face //

    fill(240, 200, 160);
    noStroke();
    arc(250, 400, 100, 100, PI + QUARTER_PI + QUARTER_PI, PI - QUARTER_PI); // neck //
    arc(350, 400, 100, 100, QUARTER_PI, PI + QUARTER_PI + QUARTER_PI);
    rect(215, 435, 170, 70);
    rect(270, 365, 70, 70);
    
    fill(240, 200, 160);
    noStroke();
    ellipse(180, 230, 50, 50); // ears //
    ellipse(420, 230, 50, 50);

    fill(240, 240, 240);
    noStroke();
    ellipse(170, 240, 10, 10); // earrings //
    ellipse(430, 240, 10, 10)

    fill(255, 255, 255);
    noStroke(0);
    ellipse(250, 200, 50, 30); // eyes //
    ellipse(350, 200, 50, 30);

    fill(85, 65, 45);
    noStroke();
    ellipse(250, 200, 25, 25); // iris //
    ellipse(350, 200, 25, 25);

    stroke(0, 0, 0);
    strokeWeight(10);
    point(250, 200); // pupils
    point(350, 200);

    noFill();
    stroke(85, 65, 45);
    strokeWeight(8);
    curve(120, 240, 215, 165, 280, 165, 270, 210); // eyebrows //
    curve(220, 270, 320, 165, 385, 165, 280, 150);

    fill(255, 255, 255);
    stroke(230, 130, 130);
    strokeWeight(8);
    arc(300, 300, 85, 70, 0, PI); // mouth //
    line(257.5, 300, 342.5, 300);

    noFill();
    stroke(0);
    strokeWeight(5);
    arc(300, 260, 25, 25, PI + QUARTER_PI + QUARTER_PI, PI - QUARTER_PI - QUARTER_PI); // nose//

    noFill();
    stroke(160, 80, 45);
    strokeWeight(5);
    ellipse(250, 205, 80, 60); // glassess //
    ellipse(350, 205, 80, 60);
    line(290, 205, 309, 205);
    line(209, 205, 179, 200);
    line(390, 205, 420, 200);

    fill(0);
    noStroke();
    triangle(215, 435, 300, 492, 120, 492); // shirt //
    triangle(385, 435, 300, 492, 480, 492);
    rect(120, 492, 360, 110);
    ellipse(125, 566, 50, 150);
    ellipse(475, 566, 50, 150);
}

In this project, I focused on using many unique graphic elements to create my self-portrait. I tried to apply most of the functions that we’ve learned in class.

Julie Choi Project-01-Face

juliechoi_portrait

function setup() {
    createCanvas(600,700); //function calls (parameter)
  background(209, 170, 130); //(r,g,b)
}

function draw() {
  noStroke();

  //eyelashes
  //line(600,180,600,200);

  //eyes

  fill(179,131,82);
  ellipse(200,250,100,100);

  fill(179,131,82);
  ellipse(400,250,100,100);

  fill(255,255,255);
  ellipse(200,258,85,85);

  fill(255,255,255);
  ellipse(400,258,85,85);

  fill(29,18,6);
  ellipse(200,250,70,70);

  fill(29,18,6);
  ellipse(400,250,70,70);

  //nose
  fill(195,128,101);
  //arc(300, 330, 80, 80, 0, PI + QUARTER_PI, CHORD);

  arc(300, 330, 80, 80, 0,PI, PI + QUARTER_PI);

  //mouth
  fill(204,98,98);
  ellipse(275,455,100,100);

  fill(204,98,98);
  ellipse(325,455,100,100);

  fill(55,38,21);
  ellipse(300,470,150,100);

  fill(209,170,130);
  rect(200,460,200,200);

  fill(204,98,98);
  ellipse(300,465,140,50);

  fill(55,38,21);
  ellipse(300,460,150,30);

  fill(55,38,21);
  ellipse(300,450,135,30);

  //hair
  fill(55,38,21); //dark brown
  ellipse(100,0,600,250);//right hair

  ellipse(600,50,500,350);//left hair
  fill(55,38,21); //dark brown

  ellipse(-30,200,250,600);//right hair
  fill(55,38,21); //dark brown

  ellipse(650,200,250,900);//right hair
  fill(55,38,21); //dark brown

  //triangles
  fill(255,255,255);
  triangle(0,700,50,600,100,700);

  fill(255,255,255);
  triangle(100,700,150,600,200,700);

  fill(255,255,255);
  triangle(200,700,250,600,300,700);

  fill(255,255,255);
  triangle(300,700,350,600,400,700);

  fill(255,255,255);
  triangle(400,700,450,600,500,700);

  fill(255,255,255);
  triangle(500,700,550,600,600,700);

  //details
  ellipse(245,380,10,10);

  //rect(150,0,464,450); //(int x, int y, int width, int length)

  }


 

If anyone knows how I look like, they would say that I don’t look anything like this. As if I wore a paper bag, this is a portrait is a representation of how I thought my appearance looked when I was a teenager still growing up. I had fun with the assignment because I had a lot of freedom to explore with different elements.

Jennifer Kong-Project01-Face

jkong1-selfie

/* 
Jennifer Kong
Section B
jkong1@andrew.cmu.edu
Project-01-Face
*/

// NOTE: a version of this exact code can be found on openprocessing. 
// https://www.openprocessing.org/sketch/584143
// I made that/the below code when I didn't have my personal laptop with me and needed to save my work somewhere.
// so I promise I'm not plagarising! 
// If needed to prove that code is mine, I can give log-in credentials to the account on openprocessing. 


function setup() {
    createCanvas(600, 800);
    background(255);
    fill(255, 193, 194); // cute pink sphere 
    noStroke();
    ellipse(300,300,500,500);

}

function draw() {
    makeHair();
    makeFace();
    makeEyes();
    makeBrows();
    makeMole();
    makeCowLick();
    makeNose();
    makeHairSweep();
    makeGlasses();
    makeMouth();
}
    
function makeHair() {
    // hair
    stroke(71, 57, 55);
    strokeWeight(150);
    line (250, 250, 173, 500);
    line (340, 255, 440, 475);

}

function makeFace() {
    //face
    noStroke();
    fill(255, 228, 175);
    ellipseMode(CORNER);
    ellipse(400, 347, 28, 40); // ear
    ellipse(179, 287, 223, 203); // top head
    ellipse(179, 204, 233, 229); // bottom head

}

function makeHairSweep() {
    // hair sweep
    fill(71, 57, 55);
    quad(270, 200, 323, 280, 430, 340, 380, 208);

}

function makeBrows () {
    triangle(328, 314, 348, 298, 350, 305); // right brow
    triangle(240, 320, 229, 304, 210, 305); // left brow 

}

function makeCowLick () {
    //shout out to processing.org/tutorials/curves/ for the explanation
    beginShape();
    curveVertex(290, 145); 
    curveVertex(290, 145);
    curveVertex(300, 172);
    curveVertex(299, 200); 
    curveVertex(299, 200); 
    endShape();

}

function makeNose () {
    // nose 
    fill (224, 180, 168);
    triangle(271, 399, 254, 414, 276, 422); 

}

function makeEyes () {
    // eyes
    fill(71, 57, 55);
    ellipse(206, 338, 28, 45);
    ellipse(325, 337, 34, 46);

}

function makeMole () {
    // mole
    noStroke();
    fill(71, 57, 55);
    ellipse(191, 388, 6, 6);

}

function makeGlasses () {
    //glasses
    fill(255, 255, 255, 100);
    rect(300, 355, 92, 57, 20);
    rect(164, 355, 92, 57, 20);
    strokeWeight(5);
    stroke(71, 57, 55);
    line(253, 370, 300, 370);
    line(390, 360, 415, 345); 

}

function makeMouth () {
    // mouth
    strokeWeight(3);
    line(256, 449, 278, 440);
    line(278, 440, 305, 450);  
    
}

Drawing in photoshop with plotted shapes.

The process was fun. I drew a sketch and uploaded to photoshop to find the exact coordinates of the the drawn features. My coding is a bit rusty but I still learned something new!

ChristineSeo-Project-01-Face

sketch

//Christine Seo
//Section C
//mseo1@andrew.cmu.edu
//Project-01-Face

function setup() {
    createCanvas(600, 600);
    background(226, 213, 248);
}

function draw() {

	// background color change
	 background (226, 213, 248); // lilac
    if (mouseX < (width / 1.5)) {
      background(0); // black
    }

    //backlight
	fill(226, 213, 248);
	strokeWeight(0);
    ellipse(292,300,490,582);

	//body shirt
	fill(255, 235, 135);
	strokeWeight(0);
	rect(175, 325, 235, 235, 220, 315, 10, 10)

	//neck
	fill(250, 219, 129);
	strokeWeight(0);
	ellipse(295,355,47,47);

	//face
	fill(250,238,212);
	strokeWeight(0);
	ellipse(295,250,290,220);

	//eyes black base
	fill(158,133,83);
	strokeWeight(2);
	ellipse(227,255,47,47);
	ellipse(357,255,47,47);

	fill(0);
	strokeWeight(0);
	ellipse(227,250,49,49);
	ellipse(357,250,49,49);

	//eyelashes
	strokeWeight(0);
	fill(0);
	ellipse(378,236,18,3);

	strokeWeight(0);
	fill(0);
	ellipse(378,242,18,3);

	strokeWeight(0);
	fill(0);
	ellipse(204,236,18,3);

	strokeWeight(0);
	fill(0);
	ellipse(204,242,18,3);

	//eyes whites 
	fill(999);
	strokeWeight(0);
	ellipse(239,250,8,8);

	fill(999);
	strokeWeight(0);
	ellipse(369,250,8,8);

	fill(999);
	strokeWeight(0);
	ellipse(222,240,12,12);

	fill(999);
	strokeWeight(0);
	ellipse(354,240,12,12);

	//nose
	noFill();
	strokeWeight(2);
	curve(285, 332, 285, 261, 308, 260, 308, 296);

	//mouth
	noFill();
	strokeWeight(3);
	curve(280,160,330,310,250,310,250,160);

	//bangs
	strokeWeight(0);
	fill(131,93,29);
	rect(149,148,280,65,60);

	strokeWeight(0);
	fill(131,93,29);
	ellipse(292,148,271,125);

	//bangs triangle
	fill(250,238,212);
	strokeWeight(0);
	triangle(210, 225, 228, 160, 236, 215);

	//side bangs
	fill(131,93,29);
	strokeWeight(0);
	ellipse(158,240,30,182);

	fill(131,93,29);
	strokeWeight(0);
	ellipse(426,240,30,182);

	//cheeks
	fill(252, 192, 253,220);
	strokeWeight(0);
	ellipse(190,280,47,20)

	fill(252, 192, 253,220);
	strokeWeight(0);
	ellipse(393,282,47,20)

	//eyebrows
	strokeWeight(0.5);
	fill(127, 93, 48);
	ellipse(365,216,38,4);

	strokeWeight(0.5);
	fill(120, 93, 40);
	ellipse(218,216,38,4);

	//shirt pocket
	beginShape(TRIANGLE_STRIP);
	strokeWeight(0);
	fill(179, 213, 248);
	vertex(245, 505);
	vertex(275, 450);
	vertex(285, 505);
	vertex(295, 450);
	vertex(305, 505);
	vertex(315, 450);
	vertex(345, 505);
	endShape();

	//arms
	strokeWeight(0);
	fill(250, 219, 129);
	rect(180,410,40,145,60);

	strokeWeight(0);
	fill(250, 219, 129);
	rect(365,410,40,145,60);

	//ponytail
	fill(131,93,29);
	triangle(255, 15, 293, 100, 321, 15);

	translate(width / 2.55, height / 6.6);
	rotate(TWO_PI / -8);
	beginShape();
	fill(179, 213, 248);
	vertex(20, 20);
	vertex(40, 20);
	vertex(40, 40);
	vertex(60, 40);
	vertex(60, 60);
	vertex(20, 60);
	endShape(CLOSE);


}

Although in the beginning I had a difficult time to locate each element to the coordinates I wanted, I successfully managed to bring out my characteristics in the self portrait. Since this was my first time coding, I had a lot of fun exploring different functions and elements!

Hannah Cai—Project-01-Face

/* Hannah Cai
Section C
hycai@andrew.cmu.edu
Project-01-Face
*/

function setup() {
  createCanvas(600,600);
  a = width / 2;
  b = width / 2;
  c = width / 2;
}

function draw() {
  scale(0.5, 0.5);

  background(202,248,255);

  // clouds
  strokeWeight(0);
  fill(255,255,255);
  rectMode(CENTER);
  rect(324 - a,250,500,222,111,111,111,111);
  a = a - 2.5;
  if (a < -1150) {
  a = 600;
  }
  rect(1117 - b,866,316,175,87,87,87,87);
    b = b - 4;
  if (b < -400) {
  b = 1500;
  }
  rect(955 - c,623,194,71,35,35,35,35);
    c = c - 3;
  if (c < -350) {
  c = 1200;
  }

  // hair
  strokeWeight(0);
  fill(35,36,40);
  rectMode(CENTER);
  rect(553,595,529,812,209,144,144,144);

  // shirt
  fill(255,214,174);
  rect(582,1153,729,542,187,187);
  noFill();
  stroke(255,159,159);
  strokeWeight(5)
  angleMode(DEGREES)
  arc(579,884,153,150,360,180);

  // face base
  strokeWeight(0);
  fill(255,240,202);
  rectMode(CENTER);
  rect(547,479,394,456,119,117,197,197);
  rect(578,764,121,237);
  ellipse(578,878,120,120)

  // hair 2
  strokeWeight(0);
  fill(35,36,40);
  ellipse(359,294,71,71);
  quad(433,229,748,247,758,432,391,279);

  // face details
    // nose, ears
  noFill();
  stroke(255,159,159);
  strokeWeight(5);
  angleMode(RADIANS)
  arc(644,465,152,152,PI + HALF_PI,HALF_PI);
  arc(656,448,74,75,PI + HALF_PI,HALF_PI);
  arc(657,500,30,29,HALF_PI,PI + HALF_PI);
  arc(392,519.5,49,49,HALF_PI,PI + HALF_PI);
  angleMode(DEGREES)
  arc(380,434,125,124,270,80);
    // eyes
  strokeWeight(0);
  fill(255,255,255);
  rect(525,436,75,40,20,20,20,20);
  rect(374,439,47,40,20,20,20,20);
  fill(35,36,40);
  rect(532,421,70,11,5,5,5,5);
  rect(378,424,40,11,5,5,5,5);
  ellipse(502,438,33,44);
  ellipse(361,439,23,40);
    // eyebrows
  rect(555,371,104,19,10,10,10,10);
  rect(359,374,49,19,10,10,10,10);
    // cheek
  fill(255,221,197);
  ellipse(543,563,145,145);
    // mouth
  fill(255,159,159);
  triangle(405,607,421,621,399,621);
  strokeCap(ROUND);
  stroke(255,159,159);
  strokeWeight(10);
  line(405,607,421,621);
  line(421,621,399,621);
  line(399,621,405,607);

    // moles
  strokeWeight(0)
  fill(35,36,40);
  ellipse(503,623,5,5);
  ellipse(586,533,2.5,2.5);
  ellipse(452,626,2.5,2.5);

  // fin!
}

process:
1. tried sketching in p5, it was too slow and quite confusing so I stopped after a while
2. made a sketch in Illustrator instead
3. started sketching in p5, referencing my Illustrator sketch
4. learned that I could view coordinates, W/H, and even corner radius in Illustrator
5. filled out all the data in p5
6. I wanted to make something interactive/live, so I added some movement in the clouds (had to research and do a lot of trial and error with this)

I had a lot of fun with the entire process of making this! It was definitely out of my comfort zone, and I got stuck in many areas, but that just makes me feel more satisfied now that I’ve finally gotten my project the way I want it to be. I can’t believe I’m actually writing code, I was always really intimidated by the idea of coding. I feel like I’ve become a lot more comfortable with p5/coding already though, even though this is just the first project.

Jenna Kim (Jeeyoon Kim)- Project 1- Self Portrait

jennakim.js

/*Jenna Kim (Jeeyoon Kim)
Section E
jeeyoonk@andrew.cmu.edu
Project-01
*/


function setup() {
    createCanvas(600, 600);
    background(173, 222, 223);
}

function draw() {
    //hair
    noStroke();
    fill(147, 127, 114);
    ellipse(375, 260, 397, 472);
    fill(147, 127, 114);
    ellipse(184, 512, 122, 122);
    fill(147, 127, 114);
    rect(180, 240, 65, 271);
    fill(147, 127, 114);
    rect(461, 242, 111, 356);
    fill(147, 127, 114);
    quad(154, 113, 176, 66, 275, 66, 231, 119);
    fill(147, 127, 114);
    quad(214, 42, 250, 23, 293, 66, 255, 90);
    fill(147, 127, 114);
    arc(180, 401, 96, 96, 0, PI, OPEN);
    fill(147, 127, 114);
    arc(180, 353, 50, 50, 0, PI, OPEN);

    //face&body
    noStroke();
    fill(250, 199, 199);
    ellipse(365, 285, 369, 439);
    fill(250, 199, 199);
    triangle(374, 305, 205, 598, 544, 598);

    //ears
    noStroke();
    fill(250, 199, 199);
    ellipse(172, 261, 81, 88);
    fill(250, 199, 199);
    ellipse(550, 249, 81, 88);

   //earrings
   noFill(0);
   strokeWeight(3);
   ellipse(555, 276, 200, 200);
   stroke(300);
   noFill(0);
   strokeWeight(3);
   ellipse(167, 285, 60, 60);
   stroke(300);

   //mustache
   noStroke();
   fill(0, 0, 0);
   rect(307, 328, 88, 26);

   //upper teeth
   noStroke();
   fill(300, 300, 300);
   rect(291, 370, 26, 26);
   fill(300, 300, 300);
   rect(325, 370, 26, 26);
   fill(300, 300, 300);
   rect(358, 370, 26, 26);
   fill(300, 300, 300);
   rect(392, 370, 26, 26);

   //lower teeth
    noStroke();
   fill(300, 300, 300);
   rect(307, 401, 26, 26);
   fill(300, 300, 300);
   rect(337, 401, 26, 26);
   fill(300, 300, 300);
   rect(368, 401, 26, 26);

   //nose
   noStroke();
   fill(241, 96, 97);
   triangle(366, 213, 365, 305, 275, 304);

   //nose holes
   noStroke();
   fill(300, 300, 300);
   ellipse(345, 270, 30, 30);
   fill(300, 300, 300);
   ellipse(310, 288, 10, 10);

   //eyes
   noStroke();
   fill(241, 96, 97);
   ellipse(291, 217, 82, 82);
   fill(241, 96, 97);
   ellipse(432, 205, 100, 100);

   //sunglasses
   noStroke();
   fill(0, 0, 0);
   ellipse(291, 217, 67, 67);
   fill(0, 0, 0);
   ellipse(432, 205, 84, 84);
   rect(305, 205, 81, 11);

   //eyelashes
   noStroke();
   fill(241, 96, 97);
   rect(287, 162, 3, 20);
   fill(241, 96, 97);
   rect(425, 125, 3, 31);

   }

I loved how this project summed up everything we learned this week; it gives me an opportunity to review everything. There are many aspects I learned about coding from this project, but most of all, I learned that it is crucial for me to put in the right code all the time. One small incorrect code can change everything.

Min Jun Kim Project 1 Face

sketch

"Min Jun Kim"
"15-104 B"
"minjunki@andrew.cmu.edu"
"Project 1"

function setup() {
    createCanvas(600, 600);
    background(0,24,160)
}

function draw() {

    fill(233,194,167)
    strokeWeight(0);
    ellipse(300,300,400,500)

    fill(255,255,255)
    rect(350, 250, 70, 30, 30, 50, 30, 30);


    fill(255,255,255)
    rect(190, 250, 70, 30, 30, 50, 30, 30);
'eyes'
    fill(12,12,12)
    ellipse(225,267,10,10)

    fill(12,12,12)
    ellipse(380,267,10,10)

    fill(230,170,150)
    quad(300, 380, 400, 330, 400, 330, 300, 320);

    fill(12,12,12)
    rect(180,220,90,10)

    fill(12,12,12)
    rect(340,220,90,10)

    fill(244,187,172)
    quad(240, 425, 280, 500, 350, 500, 400, 425);

    fill(255,255,255)
    rect(250,425,134,20)

'hair'
    fill(12,12,12)
    quad(145, 90, 275, 50, 450, 90, 300, 150);

    fill(12,12,12)
    quad(200, 200, 288, 36, 450, 90, 300, 150);

"ears"

    fill(233,194,167)
    quad(116, 200, 100, 330, 35, 210, 35, 210);

    fill(233,194,167)
    quad(483, 200, 500, 330, 550, 210, 550, 210);
'ears'

'earrings'
    fill(12,12,12)
    ellipse(95,320,10,10)

    fill(255,255,255)
    ellipse(500,320,10,10)
    }
'earrings'

When I first started with Assignment 1, I found it fairly difficult to get the size and coordinates correct. But as I got more and more used to it the Project became easier as time went. I’ve decided to go with a more modern and pop look for my self-portrait so I’ve chosen colors that popped to the eye. I’ve also incorporated a lot of pointed shapes to add to the ‘pop’ look that I was going for. That meant a lot of usage of the quad and simple geometric shapes. I’ve also set the strokeWeight to be zero to add a more natural feel to the portrait. All in all, the project got me more comfortable with the draw function that includes shapes and colors.