[CC Lab Final] Obesity Awareness


Description

For this project, I knew I wanted to work with Twitter. I also wanted to explore the world of APIs and I also wanted to explore what I could do with the information received. Instead of creating a representative visualization that visually shows the data being given, I wanted to directly use the data to create a data visualization. I wanted to learn how to splice the texts being received from live twitter feeds so that I could concatenate the texts to create one huge string which then I could splice again. By being able to control how many letters I would have in one string, I could create any type of visual I wanted using the text. I decided to represent the word obese and realized that a lot of people relate the word obese to burgers. Especially big macs. That is why I decided to make a big mac out of the tweet texts received.

Sketches and Results

In the beginning, people can see tweets that talk about obesity. I’ve used an addon called ofxTextSuite so that I could align all the tweets that were coming in regarding obesity into a bounding box.

After people take a look at the many tweets, the keyword of “obese = ” is shown to make the viewer curious of what this is about.

Slowly, the same texts that were used as the background are now used to create a sort of picture while the background itself starts to fade.

In the end, people can see that the texts have formed a burger-like shape showing that a lot of people actually do care about their nutrition and that obesity should be seriously considered as a threat to life.

Source

here is ofxTextSuite

here is the source code

Arduino-Processing Baseball

This is a baseball project that involves both the Arduino and Processing as input and output.

The processing sketch is used as a pitcher while the batter is represented by a servo motor and a button. There are four different types of pitches a player can choose from (fastball, changeup, curveball, knuckleball). All these pitches are then represented in a sequence of 15 LEDs all connected to different ports of the Arduino. Ex) If the pitcher selects the fastball, the sequence of the 15 LEDs lighting up will be faster than the sequence of a changeup. The curveball starts off fast, becomes slow, then fast again. As for the knuckleball, the LED lighting in a sequence is coded with random therefore probably making it the hardest pitch to hit a homerun.

The goal of this game is for the batter to press a button triggering a swing of the servo motor bat right at the position where the big red LED is lit up in the 15 LED sequence. If swung way to early, it will result in a foul ball which will be shown in text in the processing sketch. If bat is swung 2 LEDs or 1 LED  before the big red homerun LED, it will be a line drive. If swung directly on the big red LED, it will be a HOMERUN!

It is basically a game where the pitcher chooses different types of pitches in order to fool the batter and the batter tries to swing the bat at the right time.

Here is my code for both arduino and processing.

[CCLabHW4]Super LEDs

In this project, I worked with 1 potentiometer, 2 switches, and 10 LEDs. 5 Blue LEDS are activated by the blue switch while 5 Red LEDs are controlled by the red button. The red LEDS are activated inside a for loop inside the void loop with a delay of the sensor value provided by the potentiometer. the blue LEDS are just digitally written in the void loop.

void loop(){
  sensorValue = analogRead(sensorPin);
  buttonState = digitalRead(buttonPin);
  buttonState2 = digitalRead(buttonPin2);

  if (buttonState == HIGH){

    for(int i = 0; i<5; i++){
      digitalWrite(ledPin[i], HIGH);
      delay(sensorValue);
      digitalWrite(ledPin[i], LOW);
      delay(sensorValue);
    }
  }

  if (buttonState2 == HIGH){

    digitalWrite(7, HIGH);
    digitalWrite(6, LOW);
    digitalWrite(5, LOW);
    digitalWrite(4, LOW);
    digitalWrite(13, LOW);

Using the serial monitor, I can see what value is being given to the Arduino through the potentiometer and can control the delays of the HIGH and LOWS of both the blue and red LEDs.

 

This is my code.

[CCLabHW3]Class Kame Hame Ha

http://www.vimeo.com/29993277

You can download the zip file here : HW3

In this HW, we had to work with class.

In this work, I was truly inspired by Dragon Ball and how they do the “kame hame ha.”

I made a class name Ripple to represent each kame hame ha.

If i clicked on the left side of the screen, the kame hame ha would shoot towards and right and if i clicked on the right side of the screen, the kame hame ha would shoot towards the left and they would meet each other at the center. Once the kame hame ha reaches the center, it explodes creating a larger radius. I used sine to show the ball of electricity in motion while reaching its destination.

  void drawSine() {
    float rippleRadius = 5 + 10 * sin(circleCounter);
    if (ripple_x > width/2 - 5 && ripple_x <= width/2){
      rippleRadius += 30;
    }
    else if(ripple_x >= width/2 && ripple_x < width/2 +5){
      rippleRadius += 30;
    }
    stroke(rippleColor);
    //    noFill();
    fill(rippleColor);
    ellipse(ripple_x, ripple_y, rippleRadius, rippleRadius);
  }

  void update() {
    circleCounter += 0.05;
  }
I used three different functions inside my class in order to determine the kame hame ha's location.

for (int i = 0; i < counter ; i++){
    myRipple[i].update();
    myRipple[i].checkSide();
    myRipple[i].drawSine();
  }

[CCLabHW2]Three Functions

//Functions: myCircle, myTriangle, myRectangle, changeBackground, myRandomLines, myDrawingCircle
//Used: mousePressed, keyPressed, if statements in void draw(), for loop for my DrawingCircle

These are the functions I used to operate.

I was inspired by Mondrian’s works when making this code.

Basically in the when mouseX is less than 1/4th of the total with of the canvas, the mouse will draw random circles.

When mouseX is from 1/4th total canvas and less than 1/2 total canvas, the mouse draws random rectangles.

When mouseX is greater than 1/2 total canvas and less than 3/4 total canvas, the mouse draws random triangles.

When mouseX is greater than 3/4 canvas and less than the whole width, the mouse draws random circles, rectangles, and triangles.

When the ‘q’ key is pressed, it refreshes the background with a totally new color.

When the ‘w’ key is pressed, it draws random lines wherever in the screen.

This is the link where you can see my video: HW2

This is where you can download my pde file: HW2 pde

[CCLabHW1]Playing with Libraries

This is my first C&C Lab Homework.

I basically tried downloading every library available from processing.org but most of them were too complicated to maneuver with.

I was playing around with the ijeoma motion library involving tweens and wanted to create a motion graphic with a positive correlation of bar graphs.

In the center of the screen is the number of how many bars are required to complete the whole positive correlation and as the boxes becomes smaller, they become more and more transparent.

This is the video I uploaded on vimeo of my pde file working.

As seen in the code, I made the bar height += 1 until it reached the whole width of the canvas.

The timescale is 1f as well so that the bar graph increases at by 1 frame.

Thanks!

Processing Code:

import ijeoma.motion.*;
import ijeoma.motion.tween.*;

PFont f;

TweenParallel tp;

int barCount = 300;
float barWidth = 0;
float barHeightMin, barHeightMax;
int barTopMargin = 24;

void setup() {
  size(1200, 600);
  smooth();

  f = createFont("Arial", 12);
  textFont(f, 12);

  setupBarChart();
  setupBarChartMotion();
}

void setupBarChart() {
  barWidth = width / barCount;
  barHeightMax = height;
  barHeightMin = height / 5;
}

void setupBarChartMotion() {
  Motion.setup(this);

  tp = new TweenParallel();

//  for (int i = 0; i < barCount; i++) {
//    float randomHeight = random(barHeightMin, barHeightMax);
//    tp.addChild(new Tween("bar"+i, 0f, randomHeight, randomHeight));
//  }

  for (int i = 0; i < barCount; i++){
    float randomHeight = barHeightMin += 1;
//      if (randomHeight > barHeightMax /2 ){
//        randomHeight -= 1;
//      }
    tp.addChild(new Tween("bar"+i, 0f, randomHeight, randomHeight));
  }

  tp.repeat(Tween.REVERSE);
  //framerate
  tp.setTimeScale(1f);
  tp.play();
}

void draw() {
  background(30,100,200);

  // This animates the 1st pie chart a TweenParallel object
  for (int i = 0; i < tp.getChildCount(); i++) {
    Tween t = tp.getTween(i);

    float barHeight = t.getPosition();

    stroke(255);
    fill(255,233,200);
    fill(lerpColor(0xFFFFFFFF, 0xFF000000, t.getSeekPosition() * t.getEnd() / height));
    rect(i * barWidth, height, barWidth, -barHeight);

    noStroke();
    fill(255);
//    text((int) barHeight + "", i * barWidth + (barWidth - textWidth((int) barHeight + "")) / 2, height - (barHeight - barTopMargin));
  }

  String time = (int) tp.getTime() + " / " + (int) tp.getDuration();

  noStroke();
//  fill(lerpColor(0xFF00FF00, 0xFFFF0000, tp.getSeekPosition()));
  fill(lerpColor(255, 0xFFFF0000, tp.getSeekPosition()));
//  text(time, width - textWidth(time) - 10, height - 10);
  text(time, width/2, height/2);
}

void keyPressed() {
  setupBarChartMotion();
}

My Introduction

 

I have a background in industrial design. Until now, I’ve been designing products as an undergrad and participated in projects that collaborated with Samsung, LG, Motorola, etc. in Korea. But there was only so much I could do because I did not have a clear notion towards the engineering part of design. I wanted to study how products worked and what limitations they had. As I studied industrial design, I also became more and more interested in communications and medias of communication. I really wanted to create a new means of communication and take it to the next level between user and device. I believe it critical to increase the role of interactivity in products for the future. I worked for three months in Korea in a design consulting firm that solved problems using design methodologies before coming to MFADT. Because I want to create a new platform for communication, I want to learn the basics of physical computing and coding so that I can later on incorporate it into my thesis. I believe all designers should understand at least the basics of coding and physical computing as these serve as the basics necessary to create products these days. With the open source community ever increasing, coding and physical computing can only get more fun. I’m eager to see what I can learn!

 

portfolio : junsikkim2.oranc.co.kr/jsweb/

twitter: @jasonkim1006

facebook: /jasonkim1006

cyworld: www.cyworld.com/jasonkim1006

 

Follow

Get every new post delivered to your Inbox.