A Test for the Convexity of a Quadrilateral

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

This Demonstration draws the quadrilateral green if convex, orange if concave, and red if reflex.

Contributed by: Jon Perry (October 2009)
Open content licensed under CC BY-NC-SA



The idea is to check if the diagonals of the quadrilateral intersect as line segments. See P. Bourke, "Intersection Point of Two Lines (2 Dimensions)" and take note of the last paragraph. The formulas involve determinants; see the Wikipedia entry, "Line-Line Intersection".

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.