Recitation 10: Workshops

Intro

This week we had workshops to help us with our projects. I chose the media manipulation workshop. In my project we are going to have images pop up by the press of a button so I did the same in my video recreation. The video I chose to recreate is the first section of the BTS dance “Fake Love”. They walk in a line to the left, so I had images move toward the left by the press of buttons. 

Here is the original video

Here it is in Processing

fake love but make it processing

From this workshop I was able to practice integrating images into the keyPressed() function. This will be important to my project, so it was very helpful. I hope to play with the code further so I can make it as efficient as possible. 

Processing Code

PImage photo1;
PImage photo2;
PImage photo3;
PImage photo4;
PImage photo5;
PImage photo6;
PImage photo7;

 void setup() {
size(1500,600);
  background(0);
  photo1 = loadImage("hi tae.jpg");
  photo2 = loadImage("yoongles.jpg");
  photo3 = loadImage("hobi.jpg");
  photo4 = loadImage("kook.jpg");
  photo5 = loadImage("jin.jpg");
  photo6 = loadImage("jim.jpg");
  photo7 = loadImage("joon.jpg");
}
void draw() {

if(keyPressed) {
  photo7.resize(200,200);
  photo6.resize(200,200);
  photo5.resize(200,200);
  photo4.resize(200,200);
  photo3.resize(200,200);
  photo2.resize(200,200);
  photo1.resize(200,200);
}
}
void keyPressed() {
 
  println(key);
    if (key == 'a' || key == 'A') {
   image(photo1, 1200, 300);
    }
  if (key == 'q' || key == 'Q') {
   image(photo2, 1000, 300);
  }  
  if (key == 'w' || key == 'W') {
    image(photo3, 800, 300);
  }  
  if (key == 'e' || key == 'E') {
    image(photo4, 600, 300);
  }
    if (key == 'r' || key == 'R') {
    image(photo5, 450, 300);
    }
      if (key == 't' || key == 'T') {
    image(photo6, 250, 300);
      }
        if (key == 'y' || key == 'Y') {
    image(photo7, 100, 300);
        }

}

Leave a Reply