Processing script to triangulate an image