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]).
Asked
Active
Viewed 104 times
0
-
Do we agree that your objective is finding the convex hull ? Which software do you use ? If it is for example Matlab, use "atan2" instead of "atan". – Jean Marie Apr 07 '16 at 19:38
-
Yes, I need to do this on the paper. – Boca Bogdan Apr 07 '16 at 19:44