add: jarvis binary search for polygons#1366
Conversation
|
Hello! Thanks for the contribution. I'm not familiar with this algorithm - does this exist in other popular toolkits (in other languages, e.g. jts/geos)? |
|
I'm familiar with the Jarvis March (or gift-wrapping) algorithm for computing convex hulls, but this is intended for something different. I don't know what the best way to review this is: if it's a component of a larger feature (as you imply), then I think we'll probably hold off on reviewing and merging it for now, since it doesn't make much sense to include it in the public API as a standalone algorithm (but please correct me if I'm wrong). Whenever you're ready, open a PR based on this branch and we'll review the full proposed feature then? |
|
Hello, I have no idea if this exists in other toolkit. This algorithm can be use to make Chan's algorithm for example. Since it is part of a another algorithm I want to implement I will mark this as a draft and reopen in a week or two. |
I'm trying to discern if this is something that's likely to be useful to a relatively broad audience. If it is, then it might make sense to include it in geo. On the other hand, if it's a pretty niche application, it might make more sense to publish it as a separate crate. |
|
This is somethings that can be used in other algorithms such as Chan's algorithm. Now I don't know what is the audience for such algorithms. I wanted to created random polygons from a set of points and had to solve that issue for example. |
First part (out of 2) to implement this algorithm. This section of the code find the upper and lower tangent to a convex hull from a point strictly outside of it in O(N log(N)).