GMU:Processing im Park/Sophia Schaefer/TheFinal

From Medien Wiki
< GMU:Processing im Park‎ | Sophia Schaefer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FirstIdeaSketch.jpg StartTheIdea.jpg SecondIdeaSketch.jpg NewIdeastoPoint.jpg

ThirdIdeaSketch.jpg FourthIdeaSketch.jpg FifthIdeaSketch.jpg ProbleminThisThing.jpg SixthIdeaSketch.jpg ItisWorkingMyWay.jpg

import processing.video.*;

Capture video;
int maxFrames = 100;
PImage pic;
PImage img;

ArrayList frames = new ArrayList();

void setup(){
  
  //just THIS format, NO other possible
  size(640,480);
  
  video = new Capture(this,width,height);
  //important!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  video.start();
  
  PImage pic = createImage(width,height, RGB);
  frames.add(pic);
}

void draw(){
  PImage pic = (PImage) frames.get(0);
  image(pic,0,0);
  img = loadImage("Stones8.jpg");
  img.resize(640,480);
  int z = 0;
  int width = 780;
  int height = 10;
  
  for (int i =10; i< 480; i = i + 30){
  copy(img,z,i,width,height,z,i,width,height);
}}

void mousePressed() {
  PImage pic = (PImage) frames.get(0);
  image(pic,0,0);
}

void mouseMoved(){
  ellipse(mouseX,mouseY, 33,33);}

void captureEvent(Capture video){
  video.read();
  pic = video.get();
  frames.add(pic);
  if( frames.size() < maxFrames){
    frames.remove(0);
}}