triangulation and graph, based on cairo