// Danny Rozin ITP 2012 // drag mouse to paint live video import processing.video.*; Capture video; int brushSize= 30; void setup() { size(640, 480); video= new Capture(this, width, height); video.start(); } void draw() { } void mouseDragged() { if (video.available ()) { // copy is a very powerfull function that allows copying regions video.read(); // of images to other images or screen with resizing if wanted copy(video,mouseX-brushSize,mouseY-brushSize, brushSize*2,brushSize*2, mouseX-brushSize,mouseY-brushSize, brushSize*2,brushSize*2); } }