2014-05 – Processing Image Triangulator
With this small script you can create triangulated versions of images. It needs the "Triangulate" library to run, see downloads (works with Processing 2.2.x).
- Run sketch and choose image
- Create/Drag points: Left-Click. Colored triangles will automatically be created between them, using a Delaunay triangulation algorithm.
- Remove an existing point: hold Ctrl + Left-Click on it.
- Remove ALL points: Backspace.
- Switch between preview and final view: Right-Click
- Save PDF: hit Space to save a PDF of the current view
- Generate grids: press number keys to generate grids with densities from 1-10 (0 is treated as 10).Ctrl+Number creates grids from 11-20.
- Edge Detection: press Return. This will run the "Canny" edge detection algorithm and add some points for you.
- Remove every 2nd point: press "-" (the key left of the right shift key).
- Optimize: Press "o" to weld points together that are closer than the threshold. Use the mouse wheel to set the threshold - a little circle will be shown for a frame to preview the threshold.