Commit Graph

60212 Commits

Author SHA1 Message Date
Sandeep Kumar Dey 1979efd08f BasicPred intersects_segment_interior_inf_wedge_sp
This predicate returns true if and only if
the interior of t has non-empty intersection
with the interior of the following infinite box:
the only finite corner of the infinite box is p
and this infinite box is a 90 degree wedge defined
by the intersection of the halfplanes
with supporting lines lhor and lver through p, where
the halfplanes are both on the positive or negative
sides of the supporting lines. The positive or negative
side depends on the relative position of p with respect to s
2015-06-30 10:30:45 +02:00
Sandeep Kumar Dey 538122d883 debug message added:
std::cout << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
        << p << ") (" << q << ") (" << r <<  " (r ignored)) ("
        << t << ")  "
        << sgn << " retval= " << true << std::endl;

std::cout << "debug finite-edge-int-cf pqrt retval= "
                        << true << std::endl;

These messages were added to check the output of finite edge conflict predicate
2015-06-30 10:30:45 +02:00
Sandeep Kumar Dey 38148ad9da missing semicolon in L928 Finite edge conflict 2015-06-30 10:30:44 +02:00
Sandeep Kumar Dey f01d4b31d3 Bug fix: when t is segment in finiteedgeconflict 2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris a89fd2aa93 no warnings and 3 kernels in SDGLinf ipelet 2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris a3959221e2 debug message in Voronoi_vertex_sqrt_field_new_C2 2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris 7b690dd578 p, t are endpoints of different segments among q, r
In the incircle_p predicate of field_new,
check if p, t are endpoints of different segments among q, r.
This way, things work slightly better for inexact arithmetic.
2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris bea2875f58 debug messages in field_new file 2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris 020c643c72 more careful d2 computation in ring file
Now, the following input also works fine:

$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/1a0star_target.cin
s 0 0  200  0
s 0 0 -200 -100
s -80 -130 0 0
2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris a44a8f37d5 refined computation for PSS in ring case
I added refining in incircle_p_no_easy PSS case.

I also forced d1=0 in the case where t has common endpoint
with at least two segments among {p,q,r}. A similar adjustment
has to be done for d2. Maybe this change should also be applied
to the field_new file, but for the moment it does not seem needed.

Also, I did some white-space fixes.
2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris 9f2f5bfbb2 debug messages for d1, d2 in field_new 2015-06-30 10:30:44 +02:00
Panagiotis Cheilaris 9c01d34d35 sdg-voronoi-edges.cpp: command line argument 2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 2e4a2916d9 sdg-filtered-traits.cpp: command line argument 2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 5e8cd80d8e site arguments for some intersection functions
I changed the arguments of some functions to be sites instead of
points. This way some same_points queries can take advantage of
the site information.
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 7726c203a5 debug message in incircle_pps
Print out message when p is endpoint of t in incircle_pps.
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris db352a92ac linf_refinement use in Voronoi_vertex_ring_C2.h
Similar to use in the field file.
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 831f232023 fix vertex conflict predicate PPPS for ring file
The following is a problematic predicate:
    debug: Vertex_conflict (pqrt)=
    (p [50;50] [100;100])
    (p [0;0] [0;0])
    (p [200;200] [-100;-100])
    (s [0;0] [100;100] [0;0] [0;0])
which returns -1.
It should in fact return 0.

This is a change adapted from the similar change in the field_new file.
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 5239bc6130 linf_refinement for line
This is a finer computation of the xxxl predicate in the field_new
file. A new function linf_refinement is used instead of the older
and less refined linf_fine_radius. These changes should also be
transferred to the ring file. The case of returning LARGER should
be checked more in the linf_refinement functions and more tests
should be run.
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 010f871aaa fix when projection of point equals query point
I fixed a problem in incircle_p(p,q,t) when p, q are a point and a segment
and the query t is a point, such that the projection of the point on the
segment equals the query point t. In that case the result of the incircle
predicate was incorrectly NEGATIVE.

For example, the Vertex_conflict(p,q,t) predicate

debug: Vertex_conflict (pqt)=
(p [0;0] [60;60])
(s [-100;-100] [110;110] [0;0] [100;100])
(p [0;0] [100;100])
returns -1

However, it should return POSITIVE (or maybe ZERO).
2015-06-30 10:30:43 +02:00
Panagiotis Cheilaris 285d3264a3 fix vertex conflict predicate PPPS
The following is a problematic predicate:
debug: Vertex_conflict (pqrt)=
(p [50;50] [100;100])
(p [0;0] [0;0])
(p [200;200] [-100;-100])
(s [0;0] [100;100] [0;0] [0;0])
returns -1

It should in fact return 0. A similar change has to be made
in the ring variant of Voronoi vertex.
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris 9797cbcb97 show problems in is_valid tests
If the DEBUGVALIDHIER variable is defined in the preprocessor, then
some more information is given in the is_valid test for the
Segment_Delaunay_graph_Linf_hierarchy_2.

If the DEBUGVALIDSDG variable is defined in the preprocessor, then
some more information is given in the is_valid test for the
Segment_Delaunay_graph_Linf_2.

At this snapshot, the variables are defined.
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris e4de06d6a2 verbose=true validity test in sdg-info-set.cpp
I set the verbose=true variant of the test. However, the test
is of level zero in terms of deepness. This is in contrast with
the other programs in examples/Segment_Delaunay_graph_Linf_2/ and
probably should also be changed to level 1, which does not test
validity of the triangulation data structure. I have to talk to
Menelaos about this matter.
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris 82fe259084 Voronoi_vertex_ring_C2.h incircle l PSS refine
A refinement of the incircle l PSS predicate, like in the PPP
case. I have not done the PPS and the SSS case yet.

Here is an example input that now is displayed correctly:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/4seg3.cin
s 0 100 200 100
s 0 100 0 0
s 0 0 100 0
s 200 100 150 50
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris 61e99e7838 Voronoi_vertex_ring_C2.h incircle l PPP case
The incircle predicate for a line was refined in the PPP case
only. Probably the same has to be done for the other cases
like PPS, PSS, SSS, in the file Voronoi_vertex_ring_C2.h.
Here is an input that had a problem before, but now works:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/verseg3.cin
s -130 81 70 41
s -187 -178 26 -177
s 86 -14 86 -89
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris b5fb5da54e Voronoi_vertex_ring_C2.h PSS vertex bug fix
Use goodbisector to refine the choice of which of the three
bisectors of p, q, r to intersect in order to find v(pqr).
The above fix takes care of inputs like:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/2vv.cin
s 0 0  0 400
s -100 100 -100 200
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris 42892c7389 command line argument (filename) Segment_voronoi_2
Example possible run: ./Segment_voronoi_2 1a0star.cin
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris d569755005 command line argument in sdg-info-set.cpp 2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris 96d8cfc458 use oriented_side_linf in Voronoi_vertex_ring_C2.h
The bug fix takes care of inputs like:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/2seg.cin
s -126  51    95   30
s -235   8  -246 -109
2015-06-30 10:30:42 +02:00
Panagiotis Cheilaris a22cc6d279 bug fix in p_ref() of oronoi_vertex_ring_C2.h
Before the fix, in the PPS case, when r_ is a segment, p_ref
returns r_. Here is a formerly problematic input, that now works:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/sitesxless5.cin
s 41 576  403 561
s 360 902 637 400
s 922 398 534 156
s 107 910 169 -3
2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris c9facea91b bugfix in sps case of Vertex_conflict_C2.h
Again pnt_on_seg was used without initialization in some cases.
2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris d2ccbc59c3 bugfix for vertex conflict (pqt)
The pnt_on_seg variable was used uninitialized in some cases.
Here is a previously problematic input that now works fine:
$ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/2a2across.cin
s -150  -50  150   50
s  -50  100   50 -100
2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris 9a4ea3c933 sdg-count-sites.cpp: command line argument 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris aed4de684d Linf version of sdg-voronoi-edges.cpp 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris e4ae539f76 Linf version of sdg-red-blue-info.cpp 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris ec15b5f336 Linf version of sdg-info-set.cpp 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris c1095b85b1 Linf version of sdg-filtered-traits.cpp 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris 7b14001f3c Base functions declared 2015-06-30 10:30:41 +02:00
Panagiotis Cheilaris f0732a2ac5 Linf version of sdg-count-sites.cpp 2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris 5965522ba2 changed name of example in CMakeLists.txt 2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris f072e34164 segment Delaunay graph examples from CGAL 4.0.2 2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris 756a2bab48 Voronoi_vertex_ring_C2.h compute_helper
Use of compute_helper in PPS case.
2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris a6f46ad3b8 avoid compiler warning in Vertex_conflict_C2.h 2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris ff635c1702 Voronoi_vertex_ring_C2.h permutations of PPS
In Voronoi_vertex_ring_C2.h, the arguments can be any permutation
of PPS. Therefore, the adaptation from the field_new file has to
be done with care.
2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris 9ccdb470d8 Voronoi_vertex_ring_C2.h: bisectors, refinement
I added several debug messages. The intersection of the bisectors
of three sites is computed in a smarter way. The distance in
incircle_p_no_easy is computed in a more refined way.
2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris b172b99a49 debug message for PPS in Voronoi_vertex_ring_C2.h 2015-06-30 10:30:40 +02:00
Panagiotis Cheilaris 7bea35e876 Boolean type in Traits_base_2.h
I added also the Boolean type in Traits_base_2.h.
2015-06-30 10:30:39 +02:00
Panagiotis Cheilaris 60503a193e Vector_2 and Sign in Traits_base_2.h
I added definitions of Vector_2 and Sign in Traits_base_2.h,
because they are used in Bisector_Linf.
2015-06-30 10:30:39 +02:00
Panagiotis Cheilaris bd76786fbd Bisector_Linf is not based on Basic_predicates_C2
I converted the Bisector_Linf class so that it is not based
on Basic_predicates_C2 any more. Some changes will also be
made in Traits_base_2.h.
2015-06-30 10:30:39 +02:00
Panagiotis Cheilaris 0e7fbcd19f avoid redifinitions for edge list 2015-06-30 10:30:39 +02:00
Sandeep Kumar Dey 8eef4eada5 /commented the internal namespace 2015-06-30 10:30:39 +02:00