triangulation function corrected. partly

problem remains with adding new vertex.