Reputation: 23
For this image, I am trying to define a shape for each "territory". How would I accomplish doing this?
Upvotes: 0
Views: 417
Reputation: 219
I'm not sure how you want to implement, but this generic approach should work:
Upvotes: 1
Reputation: 16215
Hopefully you can define the shapes of your territories as a series of points - ie (x1, y1), (x2, y2), etc, then you can use one of the hit testing algorithms defined here: How can I determine whether a 2D Point is within a Polygon? (several great answers there, general enough that you could adapt the concepts to fit your needs).
Upvotes: 0