Skip to content
New issue

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

delaunay.find and coincident points #58

Closed
wants to merge 1 commit into from
Closed

delaunay.find and coincident points #58

wants to merge 1 commit into from

Conversation

Fil
Copy link
Member

@Fil Fil commented May 21, 2019

fixes #55

Copy link
Contributor

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a deterministic version of the fix...

@Fil
Copy link
Member Author

Fil commented May 21, 2019

I thought of a list of visited nodes (to avoid those if we get to another dead-end), but then it costs memory… and too much code.

@mourner
Copy link
Contributor

mourner commented May 22, 2019

Not a perfect approach too, but perhaps a custom seeded random would work?

@Fil Fil changed the title delaunay.find and coiciden points delaunay.find and coicident points May 22, 2019
@Fil Fil changed the title delaunay.find and coicident points delaunay.find and coincident points May 22, 2019
@Fil
Copy link
Member Author

Fil commented May 22, 2019

I think (i + 1) % length would be correct, in fact, in all cases… I had started with that, then I realised that I had to make 100% sure it would never fail.
But, there's no way the step ever goes from a normal point to a coincident point. So this call happens only when the initial hint i is coincident, and the only way it could loop forever, if we enumerate points with i => i+1, is if we had only coincident points — an impossibility. Right?

We can make doubly sure by memorizing the initial i and preventing any loop which could happen in the degenerate case "no valid point".

@Fil Fil mentioned this pull request May 22, 2019
@Fil
Copy link
Member Author

Fil commented May 22, 2019

closing this branch in favor of a local d3 branch

@Fil Fil closed this May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

delaunay.find fails when i is a coincident point.
2 participants