How to determine if the given points form a convex irregular Hexagon.

472 Views Asked by At

Say I have a collection of points (x,y). From the given points, I want to determine if it forms a convex irregular Hexagon.

My goal is to determine that the points I have gathered form an irregular Hexagon. The given points may vary. I can have as many as 60 - 80 or less paired values of (x,y) as my collection of points. From there, I need to know if the collection of points formed an irregular Hexagon.

The 60-80 points for examples are my points. say the 1st point is at (10,11), 2nd is (11,12) and so on. so if I am going to graph the points I can tell if it forms an irregular Hexagon or not. But since I will not be graphing the points, so I need to look for a way without graphing the points that I can tell from the collection of points that it forms an irregular Hexagon (convex) or not .

Is that possible?

Please advice.

Thanks

1

There are 1 best solutions below

0
On

It seems the following.

Each six points form a hexagon (excluding some degenerated cases), but this hexagon may be non-convex. A polygon is convex iff each four vertices of it form a convex quadrilateral. May be four points form a convex quadrilateral iff them can be separated into to pairs, say $\{a,b\}$ and $\{c,d\}$ such that segments $[a,b]$ and $[c,d]$ intersects in a their interior point.