Refactored the Triangulation example