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

Polyhedron::ConvexHull segmentation faults #43

Open
mwlow opened this issue Jul 16, 2016 · 2 comments
Open

Polyhedron::ConvexHull segmentation faults #43

mwlow opened this issue Jul 16, 2016 · 2 comments

Comments

@mwlow
Copy link

mwlow commented Jul 16, 2016

Calling Polyhedron::ConvexHull will sometimes cause a segmentation fault. I've attached a sample point cloud for which this will occur, as well as a rendering of the points.
points.txt
img

@mwlow
Copy link
Author

mwlow commented Jul 16, 2016

Centering/scaling the points seems to prevent the fault.

@juj
Copy link
Owner

juj commented Jul 19, 2016

The convex hull computation algorithm has been a pain point for some time, getting it numerically robust is proving to be very difficult. (Although I am not fully convinced if the root issues are all atm explained by numerical stability, or if there are some outright bugs as well)

When computing convex hulls, I generally have done the same trick, and computed the AABB of the points, and recentered it to origin, and scaled it to [-128, 128] range.

One thing I notice about these points is that they contain duplicates. For example the point (-136.898, 353.329, 308.042) occurs twice. It is possible that the algorithm does not resolve identical points well, but degenerates to an infinite recursion loop or something like that, which causes it to segfault when it runs out of stack space. In these kind of scenarios, filtering out duplicates might be one thing to try as well.

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