I have four points (x1,y1),(x2,y2)& (x3,y3),(x4,y4).The catch is that (x2,y2) & (x3,y3) are points that are close to each other but they are not equal. Also, (x1,y1)& (x4,y4) are points that are far away ( or the opposite sides) I want to check if these four-point together can make approximately a triangle. There are also (Xm, Ym) points in the plane. How can I check through code (python).
Asked
Active
Viewed 57 times
1
-
1Three distinct points always form a triangle... by definition. – Reblochon Masque Nov 07 '20 at 00:03
-
1@ReblochonMasque Only if they are not on the same line. – Roy Cohen Nov 07 '20 at 00:06
-
As @RoyCohen pointed out, you just need to check if these points fall on the same line. If not they can make a triangle. Give it a shot, and post a focussed qn when you are further stuck – Serial Lazer Nov 07 '20 at 00:08
-
1Correct @RoyCohen, thank you! – Reblochon Masque Nov 07 '20 at 00:14
-
@RoyCohen How should I go about checking three points are collinear or not? Can you give some input? Should I follow a similar approach as in here? https://stackoverflow.com/questions/3813681/checking-to-see-if-3-points-are-on-the-same-line – amarykya_ishtmella Nov 07 '20 at 00:34
-
Yes, that should be all you need. – Karl Knechtel Nov 07 '20 at 01:05