Games How to calculate the minimum path to close an irregular polygon without lines intersecting?

keirS

Well-Known Member
Licensed User
Longtime User
Easy to do with a simple set of points. Just draw a line from point 6 to 1


I am trying to figure out how to close (for example) this set of points to a polygon without intersection.



I am already testing that drawing a line from point 8 to point 1 will intersect a line.
Is there a generic algorithm to solve this sort of problem? I did Google it but didn't really find anything.
 

keirS

Well-Known Member
Licensed User
Longtime User
I should have thought of TSP! It's just the last journey on the route I need to calculate...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…