An example using the convexHull functionality
#include <iostream>
static void help()
{
cout << "\nThis sample program demonstrates the use of the convexHull() function\n"
<< "Call:\n"
<< "./convexhull\n" << endl;
}
int main( int argc, char** argv )
{
{
help();
return 0;
}
for(;;)
{
char key;
int i, count = (unsigned)rng%100 + 1;
vector<Point> points;
for( i = 0; i < count; i++ )
{
points.push_back(pt);
}
vector<int> hull;
for( i = 0; i < count; i++ )
int hullcount = (int)hull.size();
Point pt0 = points[hull[hullcount-1]];
for( i = 0; i < hullcount; i++ )
{
pt0 = pt;
}
if( key == 27 || key == 'q' || key == 'Q' )
break;
}
return 0;
}