How to determine if Quadrilateral is convex or not by given points

2.2k views Asked by At

Is there any way to determine whether quadrilateral is convex or not? (meaning each of its angles are less than 180 degree) by using points. For example A(0,0) B(2,0) C(2,2) D(-1,3). How can we determine that all of the angles in ABCD quadrilateral are less than 180 degrees.

1

There are 1 answers

0
sebtheiler On BEST ANSWER

I believe this link answers your question, for any polygon.

In summary, given a list of points [[0, 0], [2, 0], [2, 2], [-1, 3]], check if the direction of the cross product of any two adjacent sides are the same (if so, the polygon is convex).