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

Failure on n-gons with even n #27

Open
dmitryplatonov opened this issue Jul 4, 2015 · 2 comments
Open

Failure on n-gons with even n #27

dmitryplatonov opened this issue Jul 4, 2015 · 2 comments

Comments

@dmitryplatonov
Copy link

I feel it's due to parallel edges in such n-gons, but not completely sure.
Made simple test generator: http://pastebin.com/ULwQdgSw
git rev-parse --short HEAD
6c9c25f
Output before failure with n=100
add line 49 : 370 377
add line 50 : 377 384
add line 51 : 384 390
WARNING empty solution set!!
WARNING in_region_filter() results in empty solution set!!
WARNING t_filter() results in empty solution set!!
solution edge: (-1.39563e-05, -0.000444096)1 - (5.52635e-17, -8.75288e-18)1
solution edge: 3206[1]{1} -[2]- 3208[1]{0}
s1= LineSite: (-0.898224, 0.0565115) - (-0.9, 1.10218e-16)(k=-1)
s2= LineSite: (0.898224, -0.0565115) - (0.9, 0)(k=-1)
s3= LineSite: (-0.898224, -0.0565115) - (-0.9, 1.10218e-16)
Running solvers again:
LLLPARASolver.
s1 : -0.999507 0.0314108 -0.899556 -1
s2 : 0.999507 -0.0314108 -0.899556 -1
s3 : 0.999507 0.0314108 0.899556 1
bisector: -0.999507 0.0314108 5.55112e-17
Solution: t=0.899556 (-0.9, -28.6385) k3=1
LLLPARASolver.
s1 : -0.999507 0.0314108 -0.899556 -1
s2 : 0.999507 -0.0314108 -0.899556 -1
s3 : 0.999507 0.0314108 0.899556 1
bisector: -0.999507 0.0314108 5.55112e-17
Solution: t=0.899556 (-2.77693e-17, -2.6509e-15) k3=-1
No solutions found by solvers!
VertexPositioner::desperate_solution()
edge: (-1.39563e-05, -0.000444096) - (5.52635e-17, -8.75288e-18)
dist(): 0.899556 - 0.899556
WARNING: Returning desperate solution:
(0.0305228, 0.971251) t=0.899556 k3=-1 e_err=0.97173
s1_err= 0.404023
s2_err= 0.404023
s3_err= 0.445509
solution_on_edge() ERROR err= 0.97173
solution edge: 3206[1]{1} -[2]- 3208[1]{0}
edge: 3206(t=0.899556) - 3208(t=0.899556)
edge: (-1.39563e-05, -0.000444096) - (5.52635e-17, -8.75288e-18)
solution: (0.0305228, 0.971251) t=0.899556
python: /home/shadowjack/projects/openvoronoi/src/vertex_positioner.cpp:98: ovd::solvers::Solution ovd::VertexPositioner::position(ovd::HEEdge, ovd::Site*): Assertion `solution_on_edge(sl)' failed.
Aborted

@aewallin
Copy link
Owner

aewallin commented Jul 7, 2015

Thanks! I will add this as a test for use with ctest when I have time.
The issue of numeric robustness and exceptions probably requires some more thought and two or three layers of more 'desperate'/brute-force algorithms to fall back on in hard cases.

aewallin added a commit that referenced this issue Jul 21, 2015
this is a failure of LLLPARASolver probably for the line-segment that
'closes' the polygon i.e. is parallel to an already inserted segment.
@aewallin
Copy link
Owner

I have added this now in python_examples/issues
I will look at the solver - hopefully soon!

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