Anthony Ra – Project02 – Variable Faces

sketch


var eyeSize = 20;
var eye = 40;
var faceWidth = 100;
var faceHeight = 130;
var fillet = 100;
var head = 50;
var headd = 50;
var teeth = 20;
var sideStache = 7;
var r, g, b;

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

}

function draw() {

/* fixed symbol */
noStroke();
fill(70, 200, 0);
triangle(240, 20, 210, 100, 225, 100);

fill(150, 230, 0);
triangle(240, 20, 225, 100, 255, 100);

fill(70, 200, 0);
triangle(240, 20, 255, 100, 270, 100);

fill(30, 150, 0);
triangle(210, 100, 225, 100, 240, 180);

fill(70, 200, 0);
triangle(225, 100, 240, 180, 255, 100);

fill(30, 150, 0);
triangle(240, 180, 255, 100, 270, 100);

rectMode(RADIUS);
fill(250, 220, 190);
rect(width/2, height*3/5, faceWidth, faceHeight, fillet);
var eyeLX = width/2 - faceWidth*0.4;
var eyeRX = width/2 + faceWidth*0.4;

/* neck */
noStroke();
fill(250, 220, 190);
rect(width/2, height*4/5, faceWidth - 15, 185);

/* beard */
fill(90, 35, 5);
arc(width/2, height*3/5 + 30, faceWidth*2, faceHeight*2 - 50, TWO_PI, PI);

fill(250, 220, 190);
arc(width/2, height*3/5 + 30, faceWidth*2, faceHeight + 20, TWO_PI, PI);

/* eye */
fill(250);
ellipse(eyeLX, height*3/5 - 30, eye, eyeSize);
ellipse(eyeRX, height*3/5 - 30, eye, eyeSize);

/*pupil*/
fill(0);
ellipse(eyeLX, height*3/5 - 30, eyeSize, eyeSize);
ellipse(eyeRX, height*3/5 - 30, eyeSize, eyeSize);

/* ear */
fill(240, 220, 190);
arc(width/2 - faceWidth, height*3/5, 2*eyeSize, 2*eye, HALF_PI, HALF_PI + PI);
arc(width/2 + faceWidth, height*3/5, 2*eyeSize, 2*eye, HALF_PI + PI, HALF_PI);


fill(220, 200, 170);
arc(width/2 - faceWidth, height*3/5, eyeSize, eye, HALF_PI, HALF_PI + PI);
arc(width/2 + faceWidth, height*3/5, eyeSize, eye, HALF_PI + PI, HALF_PI);

fill(90, 35, 5);
rect(eyeLX, height*1/2 + 5, 5 + eye/2, eyeSize/4, fillet/25);
rect(eyeRX, height*1/2 + 5, 5 + eye/2, eyeSize/4, fillet/25);

/* hair */
fill(80, 30, 5);
ellipse(205, 225, head*2, head + 10);

fill(90, 35, 5);
triangle(140, 360, 150, 302, 133, 290);
triangle(340, 360, 347, 290, 330, 302);

fill(125, 40, 7);
ellipse(167, 247, headd, headd - 7);
ellipse(280, 265, head, head);

fill(90, 35, 5);
ellipse(211, 250, 2*head, head);
ellipse(150, 280, headd - 10, headd + 20);
ellipse(330, 280, head - 10, head + 20);
ellipse(260, 240, headd, headd);
ellipse(290, 226, head + 30, head + 10);

fill(115, 35, 5);
ellipse(260, 215, headd, headd);

fill(85, 30, 5);
ellipse(281, 238, headd, headd);

fill(115, 35, 5);
ellipse(176, 264, headd, headd);
ellipse(317, 248, head + 20, head);

/* teeth */

stroke(90, 35, 5);
strokeWeight(2);
line(eyeLX, 415, eyeRX, 415);

fill(50);
arc(width/2, 415, 80, 35, TWO_PI, PI);

fill(200, 0, 0);
noStroke();
arc(width/2, 415, teeth*2, teeth*4, TWO_PI, PI);

fill(250, 0, 0);
arc(width/2, 415, teeth/5, teeth*4 - 5, TWO_PI, PI);

fill(250);
noStroke();
arc(eyeLX + 10, 415, teeth, teeth, TWO_PI, PI);
arc(eyeLX + 30, 415, 20, 20, TWO_PI, PI);
arc(eyeRX - 30, 415, teeth, 20, TWO_PI, PI);
arc(eyeRX - 10, 415, 20, teeth, TWO_PI, PI);

/* stache */
stroke(90, 35, 5);
strokeWeight(10);
point(eyeLX, 410);
point(width/2, 400);
point(eyeRX, 410);

noFill();
beginShape();
curveVertex(eyeLX, 410);
curveVertex(eyeLX, 410);
curveVertex(width/2, 400);
curveVertex(eyeRX, 410);
curveVertex(eyeRX, 410);
endShape();

noFill();
strokeWeight(7);
beginShape();
curveVertex(eyeLX, 410);
curveVertex(eyeLX, 410);
curveVertex(eyeLX - sideStache, 440);
curveVertex(eyeLX - 5, 475);
curveVertex(eyeLX - 5, 475);
endShape();

noFill();
strokeWeight(7);
beginShape();
curveVertex(eyeRX, 410);
curveVertex(eyeRX, 410);
curveVertex(eyeRX + sideStache, 440);
curveVertex(eyeRX + 5, 475);
curveVertex(eyeRX + 5, 475);
endShape();

/* nose */

noFill();
stroke(90, 35, 5);
strokeWeight(3);
arc(width/2, 365, eyeSize*2, eye, TWO_PI, PI);

fill(0);
ellipse(width/2 + 7, 375, eyeSize/4, eyeSize/4);
ellipse(width/2 - 7, 376, eyeSize/4, eyeSize/4);

/* shirt */
noStroke();
fill(r, g, b, 127);
triangle(0, 575, 156, 525, width/2 + 40, 600);
triangle(480, 575, 324, 525, width/2 - 40, 600);
triangle(width/2, 575, width/2 + 40, 600, width/2 - 40, 600);

fill(r, g, b, 115);
triangle(0, 575, 0, 600, width/2 + 40, 600);
triangle(480, 575, 480, 600, width/2 - 40, 600);



}

function mousePressed() {


  eyeSize = random(10, 30);
  head = random(45, 65);
  headd = random(45, 65);
  teeth = random(15, 25);
  sideStache = random(5, 12);
  r = random(255);
  g = random(255);
  b = random(255);
}

The first thing I thought of when it came to interchangeable facial features is the life simulation game, The Sims. I know a guy in which many people and I agree on looks like the default Sims character. Implementing variables was a bit of a challenge in which I couldn’t only rely on numbers for the placement of my shapes. There are subtle changes in facial features, but as a whole, the face looks very different from the last to the next.

Anthony Ra – Looking Outwards – 01

Caledonia level in Monument Valley

“Monument Valley” is an extremely popular tablet-focused game created by UsTwo Games, a digital design firm. The storyline of this game follows a Princess Ida through labyrinths and mazes. This game stands out to me because of its illusory effect and philosophy of each frame being a public display. This project was developed over a ten-month span using Unity, a game engine and tool suite responsible for the operation of the game.

M.C. Escher is one of the masters of illusory art

UsTwo Games described their inspiration of the development of this game from artist M.C. Escher, who implements impossibility into architecture, and one of the challenges of that stage was how to tell the computer to recognize these impossibilities in a gameplay setting.

visual quality was more important than the overall duration of the game

One of the breakthroughs of this game that does not show in other popular games is the length. This focuses so much on visual quality and sound tranquility and focuses less on the number of levels or the difficulty. This allows the users for a condensed experience that would eliminate frustration and stress and create a less-anxious peaceful experience for the user.

I have no doubt because of its recognition and major accolades in the gaming and design industry, future games developers will be able to look at this game and see the visual and auditory stimulation of the user that is necessary for the overall experience of gaming. This is where the hard, pressing work of completing a game is eliminated and a condensed but artistically beautiful representation is laid right before your eyes.

Monument Valley – Behind the Scenes

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.