0

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.

givexa
  • 109
  • 2
  • 10

1 Answers1

1

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).

sebtheiler
  • 2,159
  • 3
  • 16
  • 29