geometry - How to detect if a polygon has self-intersections? -


imagine have 2d polygon (a 2d closed polygonal chain more precise). how check if contains self-intersections? can convex or concave, oriented clockwise or counter-clockwise.

now, run standard o(n log n) algorithm check if 2 segments cross. believe because have additional structure -- order of segments , fact each 2 consecutive segments meet @ endpoints -- simpler , faster (maybe o(n)?) algorithm devised.

any ideas?

do need check self-intersections, or find of them? latter harder o(n log n), can have o(n^2) intersections n segments.

if need find out if self-intersections exist, or find small amount of them, here. paper seems claim need, particularly in polygon planarization section. doubt implementing algorithm described there simple, or worthwhile problem of reasonable size. such algorithm exist. disclaimer: haven't tried work through paper , understand it.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -