//////////////////////////////////////////////////////////////////////////////// // // Project: Julaps_SlitScanning // File: Julaps_SlitTemporalWaves.java // Created by: lukaszkarluk, May 21, 2008 // //////////////////////////////////////////////////////////////////////////////// import processing.opengl.*; import processing.core.PApplet; import processing.core.PImage; import processing.video.Movie; static int DIR_X = 1; static int DIR_Y = 2; Movie mov; PImage[] frameBuffer; int slitX = 0; int slitY = 100; int slitIndex = 0; int slitSize = 1; int slitDir; int movWidth; int movHeight; int movFrameRate = 25; float timeWavesPerCycle = 0.5f; float timeWaveSpeed = 2 * PI * 0.01f; float anglePerFrame; float angle = 0; boolean isRecording = false; void setup() { frameRate( 25 ); colorMode(RGB, 1.0f); mov = new Movie( this, "decompose.mov", movFrameRate ); mov.loop(); mov.speed( 0 ); mov.read(); movWidth = mov.width; movHeight = mov.height; size( movWidth, movHeight, P2D ); frameBuffer = new PImage[ (int)(25 * mov.duration()) ]; println( "frameBuffer length :: " + frameBuffer.length + ", movWidth :: " + movWidth + ", movHeight :: " + movHeight ); for( int i=0; i