Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Nov 2006
Offline Last Active Feb 19 2011 07:03 PM

#4074298 Determining if a polygon is convex

Posted by on 05 October 2007 - 07:28 AM

You're missing the last segment of the polygon, the one that connects the last point to the first point, assuming that the first and last points in the polygon are different and that the polygon is implicitly closed. This case is handled most easily by initializing the first segment to the segment between the first and last points, and then starting the loop with i=0.