Created
March 12, 2019 12:59
-
-
Save companje/a589bc7747d94bcc05678b0b78c77761 to your computer and use it in GitHub Desktop.
Len Lye filmstrip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} | |
} |
Author
companje
commented
Mar 12, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment