New triangulation routine