We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for the port!
The docs indicate that the indices returned by Triangulation.hull are counter-clockwise.
hull: Vec<usize> [−] A vector of indices that reference points on the convex hull of the triangulation, counter-clockwise.
However I see them being returned clockwise. Which one is the right expectation?
Sample test:
use delaunator::*; fn main() { let p = vec![ Point { x: 0.0, y: 0.0 }, Point { x: 1.0, y: 1.0 }, Point { x: -1.0, y: 1.0 }, ]; triangulate(&p) .unwrap().hull.iter() .for_each(|s| println!("Hull {}: {:?}", *s, p[*s])); }
for which I get:
Hull 0: [0, 0] Hull 2: [-1, 1] Hull 1: [1, 1]
The text was updated successfully, but these errors were encountered:
It should be counter-clockwise (as a convention and to match delaunator in JS), so it might be a bug.
Sorry, something went wrong.
This was my mistake. I assumed the Y axis upright, in such orientation the triangle is oriented clockwise.
However, the library expects Y to be pointing downwards, in which case the orientation is correct.
No branches or pull requests
Thanks for the port!
The docs indicate that the indices returned by Triangulation.hull are counter-clockwise.
However I see them being returned clockwise. Which one is the right expectation?
Sample test:
for which I get:
The text was updated successfully, but these errors were encountered: