From: ben.v.r...@gmail.com [mailto:ben.v.r...@gmail.com] 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 counter-clockwise traversals.

Does graham scan guarantee something like that? I need to calculate
outward-facing 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
counter-clockwise 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 polygon-that is, if
one or more points lie inside the convex hull of the points-then 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.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to