researched and pseudocoded better triangulation algorithm