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

Broken for certain sets of points #2

Open
djozis opened this issue Apr 8, 2018 · 1 comment
Open

Broken for certain sets of points #2

djozis opened this issue Apr 8, 2018 · 1 comment

Comments

@djozis
Copy link

djozis commented Apr 8, 2018

Example:
[(0.51, 0.31), (0.41, 0.71), (0.61, 0.71), (0.11000000000000001, 0.21000000000000002), (0.11000000000000001, 0.61), (0.71, 0.71), (0.31, 0.61), (0.21000000000000002, 0.01), (0.41, 0.31), (0.51, 0.01)]
image

@artir2d2
Copy link

artir2d2 commented Jan 6, 2019

Hi, I found out that this bug happens when you have two points on plane with the same y coord. Then there are NaN values when searching for parabolas intersections at: getXofEdge. Unfortunately I wasnt able to fix that, but there is workaround for that - just generate random vertices with double y coord or if you dont care about some of the vertices, just delete duplicated y coordinates. This may help ;)

		ArrayList<Point> points = new ArrayList<Point>();
		Set<Point> set = new LinkedHashSet();
		set.addAll(points);
		points.clear();
		points.addAll(set);

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

No branches or pull requests

2 participants