samedi 24 septembre 2016

How compare funtion work in sorting point in Graham Scan Algorithm for Convex Hull?

I am trying to learn Convex hull algorithm.In Convex hull Algo ( Graham Scan ) I am clearly understood the algo but unable to figure out how compare operation work in http://ift.tt/ZpfbqV .
Is it sorting points clockwise or anti-clockwise ? Because after looking code it looks like it is sorting in clockwise order.Please explain compare function code ?I know what orientation function do but only stuck in compare function part.

Aucun commentaire:

Enregistrer un commentaire