graham_scan implemented in c++