top of page

Work_5, 

interactive video

05   /   01   /   2018

WORK 5

 

 

 

To be honest i didn't have any idea why i choose this picture. I'm being his fans like for 2 years and now here, i got a chance to meet him. 

​

https://drive.google.com/open?id=1CPzGdBL2fWJw9otkWoJdEjr1QhuVJ7TX

​

Description:

1. It's like you using a light into a darkness to see his photo.

2. I put a pixels code so it will change the color/filter from the original photo.

3. If you press 'a', it will be play some music and if you press 's', it will be stop the music.

​

​

/**Zhafirah Farras Hanifah

2018318090

Sungkyunkwan University**/

 

 

import processing.sound.*;
SoundFile jjp;
PImage jb;

void setup() {
   size(1080, 1080);
   jb = loadImage("jb.jpg");
   jjp = new SoundFile(this, "JJ Project - Tomorrow, Today.mp3");
   
}

void draw() {
  loadPixels();
  jb.loadPixels();
  for (int x = 0; x < width; x++) {
    for (int y = 0; y < height; y++) {
      int loc = x+y*width;
      float r = red(jb.pixels[loc]);
      float g = green(jb.pixels[loc]);
      float b = blue(jb.pixels[loc]);
      float d = dist(mouseX, mouseY, x, y);
      float factor = map(d, 10, 100, 5, 0);
      pixels[loc] = color(r*factor, b*factor, g*factor);
    }
  }
  updatePixels();
}

void keyPressed() {
  if (key == 'a')  {
    jjp.play();
  }else{
    if (key == 's') {
      jjp.stop();
    }
  }
}

​

​

​

Thank you.

bottom of page