implemented 2D triangles example