Skip to content

Conversation

@MrFantOlas
Copy link


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)).

@michaelkirk
Copy link
Member

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)?

@urschrei
Copy link
Member

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?

@MrFantOlas
Copy link
Author

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.

@MrFantOlas MrFantOlas marked this pull request as draft June 23, 2025 21:16
@michaelkirk
Copy link
Member

I'm not familiar with this algorithm - does this exist in other popular toolkits (in other languages, e.g. jts/geos)?

I have no idea if this exists in other toolkit.

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.

@MrFantOlas
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants