ConvexPolygonQ

ConvexPolygonQ[poly]

gives True if the polygon poly is convex, and False otherwise.

Details

  • A polygon is convex if no line segment between two points ever goes outside the polygon:
  • A convex polygon is visible from all points in the polygon.

Examples

open all close all

Basic Examples  (2)

Test whether a polygon is convex:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

ConvexPolygonQ gives False for non-convex polygons:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Applications  (4)

Properties & Relations  (6)

Possible Issues  (1)

Introduced in 2019
(12.0)