0

I want to create nation`s "sphere of influence" from systems they own on a map. Map is just a 2D grid of Vector2 coordinates.

The territory/shape can and will also be concave!

This is how it looks now:

enter image description here

This is what I want to achieve:

enter image description here

So basically, input arguments are set of Vector2D points, output would be set of all Vector2D points that would create this sphere of influence.

Wrymn
  • 173
  • 1
  • 2
  • 13
  • 1
    Possible duplicate of [Convex hull library](https://stackoverflow.com/questions/14671206/convex-hull-library) – Progman Oct 27 '19 at 18:44
  • So you search for a way turn points to a convex polygon? – TaW Oct 27 '19 at 18:44
  • @Progman ... except that this is concave... – ZorgoZ Oct 27 '19 at 18:45
  • @Wryman Finding a concave hull is not as straightforward, as with the convex hull, as there are more theoretical solutions (see: https://arxiv.org/ftp/arxiv/papers/1309/1309.7829.pdf). Unfortunately "influence" isn't well defined mathematically. What I would try, is to start from the convex hull. The, defining a direction of traversal, for each edge, find the nearest internal points to that edge (not to the line, only to the edge). Bind them in the same direction and replace the original edge with these new edges. – ZorgoZ Oct 27 '19 at 19:01

0 Answers0