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).


  1. Run sketch and choose image
  2. Create/Drag points: Left-Click. Colored triangles will automatically be created between them, using a Delaunay triangulation algorithm.
  3. Remove an existing point: hold Ctrl + Left-Click on it.
  4. Remove ALL points: Backspace.
  5. Switch between preview and final view: Right-Click
  6. Save PDF: hit Space to save a PDF of the current view
  7. 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.
  8. Edge Detection: press Return. This will run the "Canny" edge detection algorithm and add some points for you.
  9. Remove every 2nd point: press "-" (the key left of the right shift key).
  10. 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.
Triangulate-20100704.zip (33 KB)

Triangulate Library for Processing 2.2.x, needed by this sketch. The library is © 2010 by Paul Bourke, Florian Jenett, Tom Carden and Nicolas Clavaud, but has been discontinued and is not available for download from the Processing website anymore.

TriangulateImage.zip (10 KB)

Main Processing sketch.