Skip to content

Instantly share code, notes, and snippets.

@companje
Created March 12, 2019 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save companje/a589bc7747d94bcc05678b0b78c77761 to your computer and use it in GitHub Desktop.
Save companje/a589bc7747d94bcc05678b0b78c77761 to your computer and use it in GitHub Desktop.
Len Lye filmstrip
import processing.video.*;
Movie mov;
int w, h;
int rows=15;
void setup() {
fullScreen();
background(0);
h = height/rows;
w = int(4/3.*h);
mov = new Movie(this, "len-lye.m4v");
mov.loop();
mov.jump(37);
}
void draw() {
if (mov.available()) {
mov.read();
image(mov.get(), 0, height-h, w, h); //newest frame on bottom
for (int y=h; y<height; y+=h) { // copy older frames upwards
image(get(0, y, w, h), 0, y-h);
}
}
}
@companje
Copy link
Author

companje commented Mar 12, 2019

len-lye-2len-lye-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment