I’m trying to overlay a drawing sketch on a movie. The sketch I’m using is “RandomWalkLevy” from Daniel Shiffman’s “The Nature of Code”, which calls two functions in the main draw() block. However, the trace of the drawing movement is erased by the new frames of the video. I have tried adapting the code here
to create a top layer to put the drawing code. However, I’m not sure what to put between topLayer.beginDraw(); and topLayer.endDraw(); to make the Walker code work.
Any help greatly appreciated.
myMovie = new Movie(this, “station.mov”);
topLayer = createGraphics(width, height, g.getClass().getName());
void movieEvent(Movie myMovie)
image(myMovie, 0,0, width, height);
topLayer.stroke( 255 );
topLayer.line( pmouseX, pmouseY, mouseX, mouseY );
image( topLayer, 0, 0 );