for my final project, i wanted to incorporate my midterm project (the touchless light box) into a functional tool with P5. I really enjoyed manipulating photos using the video capture and messing with the pixels.
So i used the same photocell based idea for the lightbox to make a box that could be used to control the computer’s image output, as well as the light-up arduino output on the control, so that when one photocell input passed a particular threshold, the light underneath it would light up brighter, and the screen would take on a fun photo effect. the red ‘snap’ sensor was linked to a saveCanvas function so that you could keep the pictures!
so the four effects were :
- ASCII ART – the darkness was based on letters with greater stroke densities. like an ‘M’ or ‘&’ would replace a dark pixel. on the other hand, lighter pixels (but not white) would be replaced with ‘ ‘ ‘ or ‘ . ‘ it’s a pretty simple idea, but i really liked how it turned out.
- Colored Shapes! – i separated the image into five darkness levels, one for each of the four shapes, and one for white. then at random, i assigned them to different shape/colors. blue diamonds, red circles, yellow triangles, and green squares.
- pixels – these aren’t real pixels, they’re just barely overlapping squares of different opacities. the color of the overall image changes with brightness and colors in the original image.
- rotating triangles – the frame rate was cut in this one, so seeing the triangles rotate doesn’t work very well. same idea, different colors, different opacities, etc.
i’m quite happy with how this turned out, but i’m really anxious to get a better sensor reading, which may means i have to extend my reach to different resistors or sensors or transistors or whatnot.
but it was great fun working on this. 🙂
here’s the code: