testmain creates triangles and included SAH algorithm.