GMU:Processing im Park/Dirk Wäsch/Code Hausaufgabe VI

From Medien Wiki

Processing v2.1.1 Quellcode:


import processing.video.*;
 
Movie movie;
 
  size(960,540);
void setup(){
  movie = new Movie(this,"walk.mp4");
  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,1,540);
  }
}