dnam-Project02-Variable-Face

dnam-Project-02-Variable-Face

// Doo Won Nam
// 15-104 :: 1 Section B
// dnam@andrew.cmu.edu
// Project-02-Variable-Face

var faceWidth = 258
var faceHeight = 216
var eyebrowWidth = 78
var eyebrowHeight = 13
var maskHeight = 63
var mouthHeight = 24
var eyeWidth = 43
var eyeHeight = 30
var noseWeight = 18
var noseHeight = 74
var toothWidth = 19
var toothHeight = 14
var x = 640;
var dir = 1;
var speed = 10;

function setup() {
    createCanvas(640, 489);
}

function draw() {
  background(200, 147, 188);
  noStroke();
//hat
  fill(142, 79, 46);
  rect(144, 111, 362, 43);
  ellipse(325, 95, 340, 80);
//face
  fill(209, 158, 131);
  rect(190, 155, faceWidth, faceHeight);
  fill(248, 173, 133);
  rect(200, 155, faceWidth - 20, faceHeight - 10);
//eyebrows left then right
  fill("black");
  rect(209, 153, eyebrowWidth, eyebrowHeight);
  rect(335, 153, eyebrowWidth, eyebrowHeight);
//mask
  fill(95, 83, 76);
  rect(190, 166, faceWidth, maskHeight);
//mouth
  fill(185, 79, 79);
  rect(270, 318, 130, mouthHeight);
  ellipse(335, 317, 130, 24);
//teeth
  fill("white");
  rect(300, 305, toothWidth, toothHeight);

  rect(330, 305, toothWidth, toothHeight);
//left eye
  fill("white");
  ellipse(248, 190, eyeWidth, eyeHeight);
  fill("black");
  ellipse(245, 190, eyeWidth - 24, eyeHeight - 12);
  fill("white");
  ellipse(240, 185, eyeWidth - 30, eyeHeight - 20);
//right eye
  fill("white");
  ellipse(366, 197, eyeWidth * 1.5, eyeHeight * 1.5);
  fill(0);
  ellipse(363, 197, eyeWidth * 1.5 - 32, eyeHeight * 1.5 - 20);
  fill("white");
  ellipse(358, 192, eyeWidth * 1.5 - 45, eyeHeight * 1.5 - 30);
//nose
  fill(209, 158, 131);
  rect(285, 212, noseWeight, noseHeight);
  ellipse(284, 276, noseWeight + 2, noseHeight - 54);

}
//random change in width/height everytime mouse is pressed
function mousePressed() {
      eyebrowWidth = random(50, 78);
      eyebrowHeight = random(1, 30);
      maskHeight = random(20, 80);
      mouthHeight = random(24, 50);
      eyeWidth = random(23, 63);
      eyeHeight = random(20, 40);
      noseWeight = random(9, 21);
      noseHeight = random(50, 90);
      toothWidth = random(15, 24);
      toothHeight = random(10, 20);
}

Basing the face on classic cartoon image of a thief (with the line mask) and toast, I wanted to use the mousePress function to make it almost seem like the thief is surprised after being caught by the police. Using variables to make the placements and size of the facial parts easier, I was able to produce an efficient code for a interactive face.

dnam – Looking Outwards – 02

“Forest Friends at Osu Wexner Medical Center”
2014-2015

In the medical center, Forest Friends was installed to help doctors cure cancer patients. Focusing on helping alleviate stress and pain for children suffering from cancer, Forest Friends is an interactive touch screen set in the waiting room. Patients can come in and check in their hospital wristbands, which would then summon a forest animal. The forest background reacts to the patients; for example, when a patient presses long enough on to a screen, a tree grows. The background changes due to such elements, and the constant change of background helps patients not get bored of the game. However, to give a sense of familiarity, a specific animal is assigned to patient. Therefore, when a patient logs in, the animal from last time appears once again.

dnam-project01-face

sketch

// Doo Won Nam
// 15-104 :: 1 Section B
// dnam@andrew.cmu.edu
// Assignment-portrait

function setup() {
    createCanvas(268, 293);
    background(248, 173, 133);
    noStroke();
    fill("black");
    rect(0, 0, 268, 111);
    fill("black");
    rect(245, 111, 12, 70);
    fill("black");
    rect(2, 121, 86, 22);
    fill("black");
    rect(134, 121, 88, 22);
    fill("black");
    ellipse(40, 163, 20, 20);
    fill("black");
    ellipse(175, 163, 20, 20);
    fill(211, 149, 116);
    triangle(78, 210, 108, 150, 98, 210);
    fill("pink");
    triangle(98, 210, 108, 150, 127, 210);
    fill(240, 162, 150);
    rect(58, 240, 124, 10);
    fill(211, 149, 116);
    rect(58, 250, 124, 10);
}

function draw() {
    if (millis() > 2000) {
        osc.stop();
        noLoop();
    }
}

I wanted to create a pixel head portrait of myself using my limited knowledge of P5JS. I used the color schemes to show shadow and light.

DooWonNam-LookingOutwards-1

Millions of people come together to watch the annual League of Legends World Championship. While League of Legends is a current meta game that may seem too ‘pop’, the game has always been a great inspiration for me as a student. Starting with a small group and C++, Merc Merrill decided to tap into the video game market with League of Legends, a MOBA-style game. The most impressive aspect of the whole project is how prevalent it became in today’s eSports. Following up Starcraft, League of Legends has become an overwhelming favorite for eSports fans. Stadiums sell out, viewership stumps other ‘real sports’, and the game has found successful even after 7 years of release. To me, League of Legends demonstrates how technology is further expanding to the sports scene. In fact, the United States has started to give work Visa to professional eSports players because of how big the scene has become.

Fans Fill Up the Stadium to Watch the Game

How League of Legends Started

Statistics of League of Legends World Championships