Coding Graham's scan algorithm to find convex hull enclosing a set of points. I'm not able to understand the logic behind the left/right turns -
i have been referring http://www.geeksforgeeks.org/convex-hull-set-2-graham-scan/
to see if make right or left turn during scan, being done is
given points p, q, r if (slope of p-q) - (slope of q-r) > 0, considered clockwise turn. if < 0, considered anti-clockwise turn.
i'm getting maths after long time. can please explain how logic left/right turn works ?
Comments
Post a Comment