GMU:Processing im Park/Katja Bliß/code6

From Medien Wiki
< GMU:Processing im Park‎ | Katja Bliß
Revision as of 17:12, 27 January 2016 by Jochelyn (talk | contribs) (Created page with "<source lang="java"> import processing.video.*; Movie movie; void setup(){ size(750,500); movie = new Movie(this,"Park.m2ts"); movie.loop(); background(0); } void ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
  }
}