CodePudding user response:
Randomly generated three points, together with the Line methodUse SQRT ((x2 - x2) ^ 2 + (y2 - y1) ^ 2) get side
With Helen formula area

CodePudding user response:
If you don't want to seek first side, can use the following formula:A=(x1y2 + x2y3 + x3y1 - x1y3 - x2y1 - x3y2)/2.
note : when the point 1, 2, 3, clockwise is A negative, if only care about the area, take the absolute value of A can,
CodePudding user response: