170 likes | 300 Views
Translational Polygonal Two Contacts Cover. 91.504 Advanced Algorithms Computational Geometry Spring 2004 Cristina Neacsu. Translational Polygonal Covering Problem. Covering Items: set of polygonal regions Q = { Q 1 , … , Q j , … , Q m } Target Item: polygonal region P
E N D
Translational Polygonal Two Contacts Cover 91.504 Advanced Algorithms Computational Geometry Spring 2004 Cristina Neacsu
Translational Polygonal Covering Problem • Covering Items: • set of polygonal regions Q = {Q1, …, Qj, …, Qm} • Target Item: polygonal region P • Output:asolution such that Translated Qs cover P Sample P and Q Q2 Q1 P Q3
R P Second contact R R First contact P y x Two Contacts Covering • Proposition: Given a set Q of rigid polygonal covering items and P a polygonal target item, if a solution to this 2D rigid translational polygonal exact covering problem exists, then there is a cover for which the target polygon P has two contacts with the union of the translated Qs. (Daniels) P Slide s.t. you do not loose the first contact Translation on x
Qj t Previous Work - Minkowski Sum for Containment • K. Daniels, A. Mathur, R. Grinde - A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering. CCCG03 Minkowski Sum: Intersection: Containment:
Qj (-P) Two Contacts Qj P -P
BigBox(Qj) Bj Triangle(v) v Qj Tv (Bj - Tv) Two Contacts
Qj (-P) -P (Bj - Tv) (-P) (Bj - Tv)
v Qj P P Two Contacts
Two Contacts Covering • Definition:Given two polygons A and B, A trying to cover B, they are in a two contact position if they either share a vertex, or share a segment of an edge, or have vertex of B - edge of A, and vertex of A - edge of B contacts, or two vertices of B touch two distinct edges of A, or two vertices of A touch two distinct edges of B. • Definition:Given two polygons A and B, they are in a two contact position with respect to a convex vertex vof A if they either share vertex v, or two vertices of polygon B are in contact with the wedge determined by vertex v.
Approach TwoContactsCover(polygon P, list indices I) 1 if (length(I) = 1) 2 return IsPCoveredByQj(P, I) 3 for each Qj, where j I 4 for each convex vertex v of Qj 5 γj = TwoContactsPosition(P, Qj, v) 6 Pj = P γj(Qj) 7 if (TwoContactsCover(P - Pj, I – {j})) 8 return True 9 return False P = target polygon I = list of indices (available Qs)
Approach TwoContactsPosition(polygon P,polygon Qj, vertex v) 1 minkPoly = 2 Bjis a big enough enclosing box of Qj (s.t. P would fit inside) 3 Tv is a big enough triangle obtained by prolonging the sides of vertex v (s.t. it will not fragment Bj when taken out) 4 minkPolyDiff = 5 let d be the vertex of minkPolyDiff which is inside minkPoly 6 γj = vector(d) rotated by 180 degrees 7 returnγj
Implementation & Results Legend m- number of Q polygons - total number of vertices Q - number of vertices P #Pts L - number of points in the triangulation for the combinatorial approach #Pts R - number of vertices tested in the recursive approach Time - execution time in seconds C++, LEDA library 450 MHz SPARC Ultra
Implementation & Results Legend m- number of Q polygons - total number of vertices Q - number of vertices P #Pts L - number of points in the triangulation for the combinatorial approach #Pts R - number of vertices tested in the recursive approach Time - execution time in seconds
Future Work • decomposition of the target in convex pieces • development of a two contact position detection method for two polygons, which will consider reflex vertices contacts
Backup Q1 Q2 P Q3 P Q1 Q2 Q3