Implemented simple triangulation. Need to test results, but running without crash so far.