basics of 2D triangle intersection