From: Stan West <stan.west@nr...>  20110826 21:14:09

From: ben.v.root@... [mailto:ben.v.root@...] On Behalf Of Benjamin Root Sent: Friday, August 26, 2011 13:11 Actually, that might be useful. The current solution I have is to use the core contouring function in mpl to generate paths, but they doesn't seem to guarantee either clockwise or counterclockwise traversals. Does graham scan guarantee something like that? I need to calculate outwardfacing normal vectors. The points would be traversed in radial order from P's vantage, as if a radar sweep numbered each point as it passed by. I suppose that if the points form a convex polygon, then that traversal order is the same one that would result from anywhere in the interior, and it would be unambiguously clockwise or counterclockwise depending on the sort order. (You might have to handle the case in which P and two or more other points are colinear by breaking the tie in the sort appropriately.) If the points form a concave polygonthat is, if one or more points lie inside the convex hull of the pointsthen I suppose you would need additional constraints or information to choose where those points should fall in the traversal order. I'm glad the method might help. 