Graham's Scan Polar coordinates

105 Views Asked by At

I have this set of six cartesian coordinates and i need to sort them in order to apply Graham's. But i can't figure out how to do that. P[0] = (1,1) , P[1] = (2,6), P[2] = (3,3), P[3] = (4, 2), P[4] = (5,4), P[5] = (6,5). The point with the lowest y is P[0]. And then? P3 has the lowest angle, but in the answers the order is : (P[4], P[5], P[1], P[2], P[0], P[3]).