// Compile using "make" // Fill up your assigned algorithm in ch_2.hpp // Make sure you understand the input and output of this program // Draw the output using any drawing method // The drawing program should be independent of this code. // The drawing program will process the output of this program // to create the figures. // The output from this program should be a list of vertices on // the convex hull listed counter clockwise. #include "dpoint.hpp" #include "dgenerator.hpp" #include "ch_2.hpp" #include "print_sequence.hpp" #include "timer.hpp" #include #include #include #include #include using std::cout; using std::endl; typedef _cg::dpoint Point; int main(void){ std::vector v1; // After you are done implementing your algorithm // change 25 to 2500000 and time it using the timer class // Feel free to remove the couts when you are timing your // implementation std::generate_n(std::back_inserter(v1), 25,_cg::dRandGenPts(0)); std::ostream_iterator< Point > out( std::cout, "\n" ); cout << "--\nInput = Output\n--\n"; MyTimer totime; _cg::ch_2(v1.begin(), v1.end(), out); cout << "Total time taken in computation = " << totime << endl; // You should try to draw the output in // opengl/mesa/postscript/latex/metapost/java // Feel free to modify the output of this program so that // it becomes easier for you to write a drawing program that // draws the output. // _cg::print(v1.begin(), v1.end()); return 0; }