- #1
Jeff.Nevington
- 12
- 1
I am trying to find the most efficient way to select points on a 2d plane from a set that maximizes the area of the of the shape they define when joined together.
The points are all paired (sharing the same A->B vector), with these pairs also appearing mirrored about the origin. Here is an example:
https://i.imgur.com/MNARxPI.png
Sometimes a single point is used from the pair, and sometimes both.
For any given problem I can easily draw the solution by hand, but I am struggling to clearly define a sensible solution. I can loop through and for each point, check adjacent points, using the solution for which no other point in the subset is further from the origin than the joining line, but it seems messy. I feel like there should be a more elegant solution.
Does anyone have any ideas?
The points are all paired (sharing the same A->B vector), with these pairs also appearing mirrored about the origin. Here is an example:
https://i.imgur.com/MNARxPI.png
Sometimes a single point is used from the pair, and sometimes both.
For any given problem I can easily draw the solution by hand, but I am struggling to clearly define a sensible solution. I can loop through and for each point, check adjacent points, using the solution for which no other point in the subset is further from the origin than the joining line, but it seems messy. I feel like there should be a more elegant solution.
Does anyone have any ideas?