extracted trangle into triangle.cpp; use vertexMap instead of vertex