Added another condition check for triangulation in the triangulation function - making sure all midpoints of a new triangle are pass the point in triangle test of previous triangles formed by the independent point.