Code for triangulation approved and moved into a triangulation class