As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Friday, April 25, 2014

Webcam Glitch Art Processing Sketch

I have been interested in glitch art for a while, and love experimenting with video. I used this sketch as an opportunity to explore both of those. But I wanted it to be interactive as well. Therefore, I decided to use the participant's mouse position as a way to make it more interactive. As the user moves their mouse, it changes the tint color of the video, as well as the size/position of the video. I am interested in discovering new ways to alter/distort video and create more interactivity with it.



import processing.video.*;
Capture cam;
void setup() {
  size(800, 800);
  cam = new Capture(this,300,300,15);
  background(255);
  String[] cameras = Capture.list();
   
  if (cameras.length == 0) {
    println("There are no cameras available for capture.");
    exit();
  else {
    println("Available cameras:");
    for (int i = 0; i < cameras.length; i++) {
      println(cameras[i]);
    }
     
    // Initialize Camera
    cam = new Capture(this, cameras[0]);
    cam.start();    
  }     
}
void draw() {
  if (cam.available() == true) {
    cam.read();
  }
   
   
    // Tinting using mouse location
  tint(255 - mouseY,255 - mouseX,255);
  // Multiple Cam
  image(cam,0,0,mouseX,mouseY);
  image(cam,20,20,mouseX,mouseY);
  image(cam,30,30,mouseX,mouseY);
  image(cam,200,200,mouseX,mouseY);
  image(cam,220,210,mouseX -50 ,mouseY - 100);
  image(cam,330,240,mouseX -50 ,mouseY - 100);
  image(cam,335,245,mouseX -10 ,mouseY - 90);
  image(cam,340,250,mouseX -10 ,mouseY - 100);
    image(cam,200,200,mouseX,mouseY);
  image(cam,620,510,mouseX -50 ,mouseY - 100);
  image(cam,630,540,mouseX -50 ,mouseY - 100);
  image(cam,635,545,mouseX -10 ,mouseY - 90);
  image(cam,640,550,mouseX -10 ,mouseY - 100);
   
  
}

No comments:

Post a Comment