Skip to content

Instantly share code, notes, and snippets.

@Rogach
Created February 8, 2015 18:03
Show Gist options
  • Save Rogach/29cf52b69f40cc941fc6 to your computer and use it in GitHub Desktop.
Save Rogach/29cf52b69f40cc941fc6 to your computer and use it in GitHub Desktop.
ovd::VoronoiDiagram* vd = new ovd::VoronoiDiagram(1,100);
ovd::Point p0(-0.2567719874411157,-0.4983049800651602);
ovd::Point p1(0.12205285479992212,-0.640371712930281);
ovd::Point p2(-0.25972854724944455,-0.5143879072702902);
ovd::Point p3(-0.34168692840153536,-0.6418861147966213);
ovd::Point p4(-0.5288215108461576,0.18480346369654843);
ovd::Point p5(-0.35263585687204546,-0.50735692278175);
ovd::Point p6(-0.4821854389417177,0.46463421861462373);
int id0 = vd->insert_point_site(p0);
int id1 = vd->insert_point_site(p1);
int id2 = vd->insert_point_site(p2);
int id3 = vd->insert_point_site(p3);
int id4 = vd->insert_point_site(p4);
int id5 = vd->insert_point_site(p5);
int id6 = vd->insert_point_site(p6);
vd->insert_line_site(id0, id1);
vd->insert_line_site(id1, id2);
vd->insert_line_site(id2, id3);
vd->insert_line_site(id3, id4);
vd->insert_line_site(id4, id5);
vd->insert_line_site(id5, id6);
vd->insert_line_site(id6, id0);
vd->check();
WARNING t_filter() results in empty solution set!!
solution edge: (-0.305412, -0.495336)[1](t=0.0487301) - (-0.318166, -0.529515)[5](t=0.0409774)
solution edge: 85[1]{1} -[4]- 87[5]{0}
s1= LineSite: (-0.341687, -0.641886) - (-0.259729, -0.514388)(k=1)
s2= PointSite: (-0.352636, -0.507357)(k=1)
s3= LineSite: (-0.352636, -0.507357) - (-0.528822, 0.184803)
Running solvers again:
The failing 2 solutions are:
(-0.602242, -0.570893) t=0.257566 k3=1 e_err=0.376834
min<t<max=0 s3.in_region=1 region-t=0
t - t_min= 0.216588
t_max - t= -0.208836
edge type : 4
(-0.305412, -0.495336) t=0.0487302 k3=-1 e_err=0
min<t<max=0 s3.in_region=1 region-t=0
t - t_min= 0.00775273
t_max - t= -2.82525e-08
edge type : 4
VertexPositioner::desperate_solution()
edge: (-0.305412, -0.495336) - (-0.318166, -0.529515)
dist(): 0.0487301 - 0.0409774
WARNING: Returning desperate solution:
(-0.310872, -0.515321) t=0.0425166 k3=-1 e_err=0
f(0.04251663863926160442) = 0.00000000000000006245
s1_err= 6.245e-17
f(0.04251663863926160442) = 0.00000000000000000000
s2_err= 0
f(0.04251663863926160442) = 0.00000000000000000000
s3_err= 0
Error separator endpoint not in region of site LineSite
site in_region_t = -0.0252307
site in_region_raw = -0.0252307
WARNING in_region_filter() results in empty solution set!!
WARNING t_filter() results in empty solution set!!
solution edge: (-0.361855, -0.509704)[1](t=0.00951301) - (-0.528822, 0.184803)[1](t=0)
solution edge: 112[1]{1} -[1]- 105[1]{0}
s1= LineSite: (-0.528822, 0.184803) - (-0.341687, -0.641886)(k=1)
s2= LineSite: (-0.352636, -0.507357) - (-0.528822, 0.184803)(k=1)
s3= LineSite: (-0.482185, 0.464634) - (-0.352636, -0.507357)
Running solvers again:
The failing 2 solutions are:
(-0.312569, -0.71471) t=0.0123211 k3=1 e_err=7.21645e-16
min<t<max=0 s3.in_region=0 region-t=1.215
t - t_min= 0.0123211
t_max - t= -0.00280808
edge type : 1
(-0.361985, -0.509163) t=0.00950561 k3=-1 e_err=6.47366e-16
min<t<max=1 s3.in_region=0 region-t=1.00057
t - t_min= 0.00950561
t_max - t= 7.39908e-06
edge type : 1
VertexPositioner::desperate_solution()
edge: (-0.361855, -0.509704) - (-0.528822, 0.184803)
dist(): 0.00951301 - 0
WARNING: Returning desperate solution:
(-0.361855, -0.509704) t=0.00951301 k3=-1 e_err=4.24941e-15
f(0.00951301064845542187) = 0.00000000000000002429
s1_err= 2.42861e-17
f(0.00951301064845542187) = 0.00000000000000000000
s2_err= 0
f(0.00951301064845542187) = 0.00000000000000000000
s3_err= 0
find_separator_target() FATAL ERROR
find_separator_target Unable to find target vertex on face f=9 endp= 118
looking for OUT-NEW-IN: 0 - 3 - 1
looking for IN-NEW-OUT: 1 - 3 - 0
Face 9: 109(2)-f9-110(2)-f9-65(2)-f9-50(2)-f9-49(2)-f9-51(2)-f9-47(2)-f9-48(2)-f9-52(2)-f9-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment