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

Error case in WelzlEncloser.pivotingBall #20

Closed
jerdmanGH opened this issue Jan 20, 2017 · 2 comments
Closed

Error case in WelzlEncloser.pivotingBall #20

jerdmanGH opened this issue Jan 20, 2017 · 2 comments

Comments

@jerdmanGH
Copy link

The following code generates an internal error:

	final WelzlEncloser<Euclidean3D, Vector3D> encloser =
            new WelzlEncloser<Euclidean3D, Vector3D>(1e-14, new SphereGenerator());
	List<Vector3D> points = new ArrayList<Vector3D>();
	points.add(new Vector3D(0.9999999731, 0.000200015, 0.0001174338));
	points.add(new Vector3D(0.9987716667, 0.0350821284, 0.0349914572));
	points.add(new Vector3D(0.9987856181, -0.0346743952, 0.0349996489));
	points.add(new Vector3D(0.9987938115, -0.0346825853, -0.0347568755));
	points.add(new Vector3D(0.9987798601, 0.0350739383, -0.0347650673));
            EnclosingBall<Euclidean3D, Vector3D> enclosing3D = encloser.enclose(points);
@maisonobe
Copy link
Contributor

I confirm the issue.
The problem seem to be related to numerical issues. During the enclosing ball search iterations, the radius of the balls should be non-decreasing from one iteration to the next one. However, with the points sample above, one iteration leads to a ball of radius 0.04932531217754311 and at the following iteration the radius becomes 0.049325312177543094 which is 1.6e-17 smaller. The difference is 2 ulps only.
I am looking at this.

maisonobe added a commit that referenced this issue Jan 24, 2017
Thanks to jerdmanGH for reporting the issue.
Fixes GitHub #20.
@maisonobe
Copy link
Contributor

The issue has been fixed in commit 842ccd2.

Thanks for the report!

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