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

inf recursion check should use loop? #9

Open
cbm755 opened this issue Aug 27, 2017 · 3 comments
Open

inf recursion check should use loop? #9

cbm755 opened this issue Aug 27, 2017 · 3 comments

Comments

@cbm755
Copy link
Owner

cbm755 commented Aug 27, 2017

In cpCutHole, there is a little nudge given in some rare conditions to prevent an infinite loop when certain normal vectors line up. This is detected with if dist2 < tol2....

This if statement is a vector because dist2 is generally all the points we're processing. This is wrong. IMHO, Matlab should raise an error here but it does not (Octave might, I argued that it should but I cannot recall the outcome).

anyway the right thing to do is to find if there are any points that are not converging and perturb only those points...

CC @KellyHu

@KellyHu
Copy link

KellyHu commented Aug 28, 2017

Thanks for your advice! I agree that when I print out dist2, it's a long vector.
In the 2-d case, I know for sure that one point needs to be fixed because it should have a similar value with the opposite point by symmetry on the ellipse. However, on the ellipsoid surface, I did not notice an unusual point so far... It seems they are all converging. Do you have any advice on finding the points that are not converging? Thanks!
201pts

@cbm755
Copy link
Owner Author

cbm755 commented Aug 28, 2017

The cp function for the ellipse has some optimization in it so probably all values are perturbed slightly, which is probably enough to avoid the symmetry.

Maybe similar things can happen with non-convex shapes... some condition on the angles I guess, goes into fixed point thm (somehow!)

@KellyHu
Copy link

KellyHu commented Aug 28, 2017

Thanks for your comment! Yes, some non-convex shapes, especially the triangulated surfaces like bunny and pig. I thought about the issue before. Maybe calculating the "slope" (gradient in 3-D?) between the projection points can measure the angles? In 2-D it's just the slope I guess.

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