Commit Graph

64306 Commits

Author SHA1 Message Date
Panagiotis Cheilaris 0380948f3e verbose print after insertion of every site 2015-06-30 10:30:52 +02:00
Panagiotis Cheilaris 1e229ecc99 support for verbose printing of SDG
The printing did not work for dimension = 1.
The edges printed has to be checked, when dimension = 2.
2015-06-30 10:30:52 +02:00
Sandeep Kumar Dey a45559a443 print current state of sdg
std::cout << sdg ;
2015-06-30 10:30:52 +02:00
Sandeep Kumar Dey 5aa5bbda53 print-sdg.cpp
We have created thid new example program
that is responsible for printing
vertices, edges, faces of sdg,
and also vertices on convex hull of sdg.
2015-06-30 10:30:52 +02:00
Sandeep Kumar Dey 327eb537ad added example print-sdg.cpp in CMakeList 2015-06-30 10:30:52 +02:00
Sandeep Kumar Dey 9b0fba7e5a construction and inf-edge-conf
inf-edge-conf
when t is segment and sgn is negative,
we have tentatively return true for the case:
q or r or s is a segment and sgn is negative.
Constructions:
For the new bisector type,
now we have bisector lines, for the case:
p and q both segments sharing an end-point.
2015-06-30 10:30:52 +02:00
Sandeep Kumar Dey 657d9bc405 removed assertion in fec
fec pqrt
removed assertion when sgn is negative
and one of p or q is segment and one is point,
the point can be end point of segment.
2015-06-30 10:30:52 +02:00
Jane Tournois cbd9a083c9 use filenames and improve tests 2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey f2da3410c7 extra closing brace } removed 2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey 24a52f2101 vertex conf PSS
when p is end point of q and t
the vertex p,q,inf is destroyed due to insertion of t.
So vertex conf(q,p,t) should return -1.
2015-06-30 10:30:51 +02:00
Panagiotis Cheilaris 0f7533fab6 show return values of edge conflict tests 2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey 24caa7a1f7 pss vertex conflict case
when t is segment perpendicular to q with common end point p
then it is quidistant from vertex q,p,inf
2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey 74f8b97fe8 incircle_sps, inf-edge-conf fot t.is_seg, fec
In vertex conf, we have updated the incircle_sps function
In h10.cin
incircle pqt : 0,100(C)  0,0 100,0(AB) 0,0 0,100(AC) should return -1
For t.is_segment(), In infinite edge conf, we always returned false earlier,
but we have updated now C AB A AC sgn = -1 should return true
In Finite edge conf, we removed the assertions t on oriented boundary
in pqrt functors, in point-segment case.
2015-06-30 10:30:51 +02:00
Panagiotis Cheilaris 1c08522b8a ipelet for Linf axis-parallel segments 2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey dd387c0f7d finite edge conf + inf edge conf
Removed the assertion of not(horizontal or vertical segment) in
Finite edge conflict p,q,r,t, sgn
And added debug message in Inf edge conf.
2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey 8f76a72fb9 Vertex conflict pqt + Construction pcl
When t is segment, p is endpoint of segment
and q is not end point of segment, then the vertex at infinity
between p and q should be in conflict, we have updated this
in this commit.
Also we have done a little change in Construction of pcl
between a endpoint of segment and segment itself.
we have omitted the portion that if q is point we have to change
the direction, this is because the logic is written wrt pnt and seg,
so it became independent of p and q.
2015-06-30 10:30:51 +02:00
Sandeep Kumar Dey 4ac4752a27 construct pcr
A bisector ray is constructed,
when we have a segment and two points,
such that points are not end point of segment.
example h4.cin
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 2762e2ea47 vertex conflict pqt
vertex conlict pqt is called as
incircle_p(q,p,t)
and the function is written as
incircle_p(p,q,t)
so logic has to be reversed for
finding conflict of vertices in clockwise direction.
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 5e8f265c0d vertex conflict in PPS case
Here  the points are not end point of segment,
and they are on the same side of the supporting segment.
We have updated the code for determing vertex conflict
in this point-segment case.
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 93ebfb8eca construct bisector segment
We updated the bisector segment code
for point-segment case, where point is end point of segment.
The number of points defining the bisector segment can be 2 or 3
depending of the configuration of sites.
Note: the logic can be simplified by using
oriented_side_of_line funcion of basic predicates.
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 4014ae1c3a construct pcr
When p is a point that lies in the region of q
where q is end point of a segment, and p is
on the supporting line of the segment, the pcr
should be a single linear segment in appropriate direction
depending on the position of point p and the segment.
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 8b88ba599d Vertex conflict pqt
pq is point-segment or segment-point
t is point, when pqt have orientation = ZERO
Both infinite vertices between p and q are
in conflict due to insertion of t.
Example h6.cin
p=0,0 , q = 0,0 100,0 , t=-50,0
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 11a859efd9 construction of pcr
pcr for vertical segment and point is added
p=not end point of q
q=segment
r=end point of q
Also the code for horizontal segment and point
is updated, pcr can have one or two linear component
depending on the position of point wrt segment.
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 13dea72af6 construction of pcr
point is not an end point of segment
still we can have ray between point and segment
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey 91ae158925 compute PPS vertex
When one P=P1 is an end point of S and other P=P2
lies on the bisector P1S, or in the region of P1,
we have to compute finite voronoi vertex of PPS type.
So we add this portion of code in Voronoi_vertex_sqrt_field_new_C2.h
2015-06-30 10:30:50 +02:00
Sandeep Kumar Dey bf63c2d41e pcr point segment case in construction is modified
when point is end of segment, now we have the ray with
two linear components.
example:
h3.cin A 0,0 AB 0,0 100, 0 C 0,50
pcr for A , AB, C will be
p[0]= -25, 25
p[1]= 0,0
and d=-1,-1
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey 25f2d4c07b compare_distances_sp from q
when p is end point of s,
the checks for q closer to p or s are modified.
example p 0 0 s 0 0 100 0 and q -10 50
q is closer to s because of new bisector type
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey 8f24e3a73c construct_vv PPS case
In Voronoi_vertex_sqrt_field_new_C2
Following PPS is handled:
A:(0,0) AB:(0,0 100,0) C:(0,50)
A is end point of AB and C is another point
which is not end point of input segment,
we will have a finite voronoi vertex.
In Vertex conf debug messages are added.
2015-06-30 10:30:49 +02:00
Panagiotis Cheilaris 2640c05b82 debug value of o after is_certain check 2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey d6228c2d21 debug message are added
in vertex conf for checking orientation linf
in sqrt_field_new for checking if vertex is computed
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey 8df7354020 vertex conf and finite edge conf modified
In Vertex conf pqt case
we can have infinite vertex even if p is not endpoint of q
and so previous assertion is removed, and the case is included
when p is not end point of q, and we check for the conflict
due to insertion of t
In Finite edge conf for p,q,t,sgn functor
we removed the assertion of p is endpoint of q,
and included the case when p is not end point of q
and check for the conflict with t
This solves the test case h2.cin
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey 28bc4f762a line bisector direction
The direction of bisector between a
vertical segment and point is modified.
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey ced5923eb6 infinite edge conf updated
In q,r,s,t, when both r and are end points of q,
and sgn is positive, it should return true,
as partially the inf edge is in conflict
2015-06-30 10:30:49 +02:00
Sandeep Kumar Dey fe2e59a2b9 Incircle_p pqt is updated
point-segment case is modified,
 one of p and q is point and the other is segment
 and t is point.
2015-06-30 10:30:48 +02:00
Sandeep Kumar Dey 76ce8e21b5 debug enabled in demo 2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 3c93b074f2 simplified general Linf VD segment ipelet 2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 40da454a07 update draw in general SDG Linf
I also update in the general (not necessarily axis-parallel segment)
case code the drawing (draw_dual_edge). Hopefully, ipelets will be
simplified.
2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 654aa211df update general Linf polyline to draw components
I also change the general Linf code.
2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 24893fe941 trailing whitespace removal in polychain code 2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 4bad319fcb draw components of polyline in draw_dual_edge 2015-06-30 10:30:48 +02:00
Panagiotis Cheilaris 7e635801fd support for drawing polylines in any stream
The drawing is done by pushing in a stream the constituent
segments and rays of a polyline. The code is almost identical
to the QT drawing code.

It will be used to simplify drawing operations in ipelets.
2015-06-30 10:30:48 +02:00
Sandeep Kumar Dey 7cd8e3714a Indentation fix 2015-06-30 10:30:48 +02:00
Sandeep Kumar Dey 74580c14c8 removed compiler warnings
we added assert false and return statements,
The function should not reach these locations.
2015-06-30 10:30:47 +02:00
Sandeep Kumar Dey 6f2ce90a62 incircle_p pqt with one site point and one segment
pqt case is handled properly the conflicts
are changed because of choice of new bisectors
Line 364 when one of p or q is a point
and the other is a segment, with query t = point
2015-06-30 10:30:47 +02:00
Sandeep Kumar Dey 327e6eb2c2 Inf edge conflict qsrt
s and r are end points of q
and t is point
This case should always return false
2015-06-30 10:30:47 +02:00
Sandeep Kumar Dey e826712740 Removed the case of general segment
Incircle_pps and Incircle_sps
In these cases the general segment cases are removed.
Incircle_pss case also needs updation, it should be more simplified.
2015-06-30 10:30:47 +02:00
Sandeep Kumar Dey 3299267643 Coordinates are replaced by Point_2
This is done in incircle test,  when query site t is segment
2015-06-30 10:30:47 +02:00
Panagiotis Cheilaris 454c5db99c examples files for axis-parallel SDG 2015-06-30 10:30:47 +02:00
Panagiotis Cheilaris 710a864b23 demo files for axis-parallel SDG 2015-06-30 10:30:47 +02:00
Panagiotis Cheilaris 0c1fd5ee3b demo resource files for axis-parallel SDG 2015-06-30 10:30:47 +02:00