compute the area of a triangle