Possible Duplicate:
How do determine if a polygon is complex/convex/nonconvex?
I'd like to know how you would check if a polygon is convex or not.
One apparent way of doing it is to run a convex hull algorithm. If the number of points in the convex hull is the same as the number of points in the polygon, does that mean the polygon is convex?
Walk around the polygon, check that at each node that you are turning the same way (either left or right, consistently, the whole way round).
I think finding the convex hull of a set of points is more complicated than checking if a polygon is convex, so going about it in that way might be less desirable.