Hello all,
I tried to code a LightPainting sketch for educational use. I don't need a superb result but something basic and, if possible, fun.
My current code display some "splash" during the record. It's very ugly but I don't know how to reduce this.
Here is a example of what I called "splash" :
And here is the code :
Entire code is on GitHub if you want to help a newbie.
Thanks for your help.
I tried to code a LightPainting sketch for educational use. I don't need a superb result but something basic and, if possible, fun.
My current code display some "splash" during the record. It's very ugly but I don't know how to reduce this.
Here is a example of what I called "splash" :
And here is the code :
- cam.loadPixels();
- screen.loadPixels();
- for (int i = 0; i < cam.pixels.length; i++) {
- if ((brightness(cam.pixels[i]) > brightLimit) && (brightness(cam.pixels[i]) > brightness(screen.pixels[i]))) {
- screen.pixels[i] = cam.pixels[i];
- }
- }
Entire code is on GitHub if you want to help a newbie.
Thanks for your help.