GMU:Processing im Park/Katja Bliß/code6

From Medien Wiki
import processing.video.*;
 
Movie movie;
 
void setup(){
  size(750,500);
  movie = new Movie(this,"Park.m2ts");
  movie.loop();
  background(0);
}
 
void movieEvent(Movie m){
  m.read();
}
 
void draw(){
  noStroke();
  for(int i = 0;i < 10000; i++){
    int x = (int(random(0, width)));
    int y = (int(random(0, height)));
    color c = movie.get(x,y);
    fill(c,100);
    rect(x,y,2,2);
  }
}