This “ditty” is a fun one: a client-side web app that takes a photo you give it and does the following:
- Downsample it
- Greyscale it
- Determine how much black (as a percentage) is in a given downsampled pixel
- Use that to generate 3D truncated cones where the top surface of each fills that percent of its allocated square
- Export as an STL for 3D printing
Ie, you give it a photo, it gives you an STL that you can 3D Print, then use the print as a block print (like, with ink).
Entirely frontend code using my usual tools. Writeup of the whole process on Instructables.
Dates: 2014
Explorations: Create large file blobs in-browser. Generate geometry programmatically with ThreeJS.
Technologies: JavaScript (ThreeJS), File / Blob APIs
Github: Closed source, but if you’re really curious let me know.
Live Demo: http://strandedcity.github.io/BlockPrintGenerator/