triangulation test function finished.