Wondered whether it could be possible to actually paint with light.
The program first asks the person to define a point that it needs to persistently track. Sometimes, people might click on points that aren't distinct in the surroundings which may lead to errors (as shown below).
Then, it tracks only that point throughout the duration of the running program. To make it act more like a brush, I used an LED with one side taped to a coin battery and the other controllable with a finger.
Each frame, the program tries to detect the defined point. If it does, it leaves a circle on the x & y location of the point (as received through the webcam). Since these are digitally made circles, a person can change certain properties of that circle (here, colour).