triangulate.cpp