calculate the area of any shape(self-intersection)