Home > Net >  For help, the topic of c # for answers
For help, the topic of c # for answers

Time:11-17

Programming: c # form: in picturebox1 random draw a triangle, and calculate the area,

CodePudding user response:

Randomly generated three points, together with the Line method
Use 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:

reference 1/f, guiyang horse Ma Shanfu plugging waterproof engineering professional maintenance of swimming pool response:
randomly generated three points, together with the Line method
Use SQRT ((x2 - x2) ^ 2 + (y2 - y1) ^ 2) get side
With Helen formula area
can write out, have not learned, class of 55555
  •  Tags:  
  • C#
  • Related