Added to_triangles to Generator