Triangulation with midpoint method.

Change-Id: I3a060ef5f32f9488fe0057506d6ccaef96a672f8