add nb triangle algo, to be debug