Computing the Fréchet Distance Between Folded Polygons

Slides:



Advertisements
Similar presentations
Fundamental tools: clustering
Advertisements

Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Generalization and Specialization of Kernelization Daniel Lokshtanov.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Approximations of points and polygonal chains
Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
QuickSort Average Case Analysis An Incompressibility Approach Brendan Lucier August 2, 2005.
Dynamic Planar Convex Hull Operations in Near- Logarithmic Amortized Time TIMOTHY M. CHAN.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
On Map-Matching Vehicle Tracking Data
Applications of Euler’s Formula for Graphs Hannah Stevens.
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
Viewing & Clipping In 2D. 2 of 44 Contents Windowing Concepts Clipping –Introduction –Brute Force –Cohen-Sutherland Clipping Algorithm Area Clipping –Sutherland-Hodgman.
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
A (1+  )-Approximation Algorithm for 2-Line-Center P.K. Agarwal, C.M. Procopiuc, K.R. Varadarajan Computational Geometry 2003.
Feb Polygon Triangulation Shmuel Wimer Bar Ilan Univ., School of Engineering.
The number of edge-disjoint transitive triples in a tournament.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computational problems, algorithms, runtime, hardness
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
Image Morphing : Rendering and Image Processing Alexei Efros.
Chapter 4: Straight Line Drawing Ronald Kieft. Contents Introduction Algorithm 1: Shift Method Algorithm 2: Realizer Method Other parts of chapter 4 Questions?
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
On Map-Matching Vehicle Tracking Data. Outline Authors Errors in the data Incremental MM Algorithm Global MM Algorithm Quality Measures Performance Conclusion.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
The Art Gallery Problem
Definite Integration and Areas 01 It can be used to find an area bounded, in part, by a curve e.g. gives the area shaded on the graph The limits of integration...
Efficient Partition Trees Jiri Matousek Presented By Benny Schlesinger Omer Tavori 1.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Curve Modeling Bézier Curves
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Digital Image Processing
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Physical Mapping of DNA Shanna Terry March 2, 2004.
Area/Sigma Notation Objective: To define area for plane regions with curvilinear boundaries. To use Sigma Notation to find areas.
1 OBJECTIVE The student will learn the basic concepts of translations, rotations and glide reflections.
4/28/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Shape Matching Carola Wenk A B   (B,A)
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
1 Shortest Paths in Three Dimensions Speaker: Atlas F. Cook IV Advisor: Carola Wenk.
Nonoverlap of the Star Unfolding Boris Aronov and Joseph O’Rourke, 1991 A Summary by Brendan Lucier, 2004.
1 Triangulation Supplemental From O’Rourke (Chs. 1&2) Fall 2005.
Approximation algorithms for TSP with neighborhoods in the plane R 郭秉鈞 R 林傳健.
Volume: The Disk Method
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
12 INFINITE SEQUENCES AND SERIES. In general, it is difficult to find the exact sum of a series.  We were able to accomplish this for geometric series.
Geodesic Fréchet Distance Inside a Simple Polygon Atlas F. Cook IV & Carola Wenk Proceedings of the 25th International Symposium on Theoretical Aspects.
1/29/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries Carola Wenk.
Area/Sigma Notation Objective: To define area for plane regions with curvilinear boundaries. To use Sigma Notation to find areas.
Definite Integration and Areas 01 It can be used to find an area bounded, in part, by a curve e.g. gives the area shaded on the graph The limits of integration...
Vectors and the Geometry of Space Section 10.4 Lines and Planes in Space 2015.
1 Schematization of Networks Rida Sadek. 2 This talk discusses: An algorithm that is studied in the following papers:  S. Cabello, M. de Berg, and M.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Curve Simplification under the L 2 -Norm Ben Berg Advisor: Pankaj Agarwal Mentor: Swaminathan Sankararaman.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
Polygon Triangulation
Area/Sigma Notation Objective: To define area for plane regions with curvilinear boundaries. To use Sigma Notation to find areas.
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Hamiltonian cycle part
Linear Programming.
Computational Geometry
Presentation transcript:

Computing the Fréchet Distance Between Folded Polygons Carola Wenk University of Texas at San Antonio Joint work with Jessica Sherette, Atlas F. Cook IV, Anne Driemel, Sariel Har-Peled

Outline Preliminaries Simple Polygons Algorithm Folded Polgons Diagonal Monotonicity Test Untangling Image Curves Folded Polygons Algorithms Fixed Parameter Tractable Algorithm Approximation Algorithm Special Variants of Folded Polgons Conclusion

Fréchet Distance for Curves Dog walking example Person is walking a dog (person on one curve, dog on the other) Allowed to control their speeds but not allowed to go backwards Fréchet distance of the curves: minimal leash length necessary for both to walk the curves from beginning to end A B

Fréchet Distance for Surfaces Let A,B: [0,1]2 Rd be two surfaces dF(A,B) = inf max ||A(p) – B(s(p))|| s: [0,1]2  [0,1]2 p [0,1]2 where  ranges over orientation preserving homeomorphisms. Usually: Piecewise linear surfaces in R3.

Fréchet Distance between Surfaces Computing the Fréchet distance between surfaces is NP-hard One triangle, one triangulated surface [G98] Two polygons with holes or two terrains [BBS10] The Fréchet distance between surfaces is upper semi-computable [AB10]. It is not known whether it is computable. The Fréchet distance between two simple polygons can be computed in polynomial time [BBW08] We extend this algorithm to “folded” polygons

Simple Polygons Algorithm [BBW08] It is easy to compute the Fréchet distance between closed polygonal curves The Fréchet distance between a convex polygon and a simple polygon is the same is that between their boundary curves. Idea: Restrict the class of mappings to consider Given two simple polygons P and Q Divide them up into matched pairs of convex polygons and simple polygons. Then use the approach above to check whether the distance is within some .

Simple Polygons Algorithm

Simple Polygons Algorithm

Simple Polygons Algorithm “diagonals” in P are the line segments in a convex subdivision of P “edges” in Q are the line segments in a convex subdivision of Q [BBW08] demonstrate that it suffices to consider mappings that map ∂P onto ∂Q such that dF(∂P,∂Q)  e diagonals in P to shortest paths in Q with Fréchet distance  e

Simple Polygons Algorithm

Simple Polygons Algorithm

Simple Polygons Algorithm

Simple Polygons Algorithm

Simple Polygons Algorithm “diagonals” in P are the line segments in a convex subdivision of P “edges” in Q are the line segments in a convex subdivision of Q [BBW08] demonstrate that it suffices to consider mappings that map ∂P onto ∂Q such that dF(∂P,∂Q)  e diagonals in P to shortest paths in Q with Fréchet distance  e

Folded Polygons We extend this algorithm to non-flat surfaces. Specifically, we consider piecewise linear surfaces with a convex subdivision which has an acyclic dual graph (“folded polygons”)

Shortest Paths? The simple polygons algorithm maps diagonals in one surface to shortest paths in the other surface. For folded polygons, mapping a diagonal onto a shortest path is not necessarily optimal.

Shortest Path Counter Example s1 is the shortest path between a and b, but the diagonal d has smaller Fréchet distance to s2 than to s1.

Fréchet Shortest Paths Fréchet shortest paths = paths with Fréchet distance e to a given diagonal The shortest path between two points on the boundary of Q crosses some sequence of edges. We prove that any Fréchet shortest path between those points crosses the exact same edge sequence. Q

Fréchet Shortest Paths Like the shortest path, we can prove that the portion of a Fréchet shortest path between two adjacent edges in Q consists of a line segment.

Diagonal Monotonicity Test Greedy O(n) algorithm to decide if there exists a path between two points on Q within Fréchet distance e of a diagonal. (n = # edges in Q). P and Q “pass the diagonal monotonicity test for e” iff dF(∂P,∂Q)  e (this specifies a mapping of the diagonal endpoints) For every diagonal in P, a Fréchet shortest path with distance at most e to the diagonal exists.

Problem of Tangled Image Curves The image curves may cross (“tangle”) In this case, the subdivision of Q is no longer valid. We need to ensure that these image curves can be untangled.

Problem of Tangled Image Curves Unfortunately, there exist cases were these image curves are forced to tangle. In the example pictured below P and Q pass the diagonal monotonicity test for e = 1 (i.e., dF(∂P,∂Q)  1, and there exist Fréchet shortest paths with Fréchet distance 1 to the diagonals).

Problem of Tangled Image Curves But the image curves for d1 and d2 must cross out of order along the edges e1 and e2 for e =1. Thus we do not have a homeomorphism between P and Q. Therefore, even if P and Q pass the diagonal monotonicity test for e, the Fréchet distance between P and Q may be greater than e.

Results To ensure a homeomorphism exists between the surfaces we must address such tangles. We consider three approaches: Compute the constraints posed by such tangles directly.  fixed parameter tractable algorithm Use an approximation algorithm which avoids the tangles altogether.  poly-time approx. algorithm Consider a special non-trivial class of folded polygons for which we can use shortest paths instead of Fréchet shortest paths.  poly-time algorithm

1) Computing Tangle Constraints Directly Fixed parameter tractable algorithm, assumes constant number of edges and diagonals. A point is in the “untanglea- bility space” for an edge e iff the image curves can be untangled on e for the specified points.

2) Approximation Algorithm Suppose P and Q pass the diagonal monotonicity test for e. We prove that dF(P,Q)  9e . We can then optimize this e in polynomial time using binary search and the diagonal monotonicity test. Thus, we have a 9-approximation algorithm.  Plug the diagonal monotonicity test into the polynomial-time simple polygons algorithm So, how do we prove dF(P,Q)  9e ?

9-Approximation: Proof Sketch Choose a diagonal d in P which cuts off an ear. To have a homeomorph- ism between P and Q the image curve of d in Q, call it d', must also cut off an ear. If another image curve d’1 crosses d‘ then we no longer have a homeomorphism.

9-Approximation: Proof Sketch Idea: Let's map d to the “upper envelope” of the image curves, call it d’’ . How much do we need to increase e to do this?

9-Approximation: Proof Sketch Consider the pre- images of the points where d' and d'1 cross. We can use these to bound how far d is from the part of d'1 that crosses above it.

9-Approximation: Proof Sketch Consider mapping from a to a' and then to a1. Likewise from b to b' to b1. From this follows that dF(ab,a1b1)  2e .

9-Approximation: Proof Sketch Thus for each point on ab we can first map it to a point on a1b1 within distance 2*e and then map it to a point on d’1 within distance e. Therefore, ab can be mapped to the part of d’1 between a' and b' within distance 3* e .

9-Approximation: Proof Sketch If d’1 then crosses another image curve d’2 this poses a problem. Their crossing will have two pre-images on d. One from using the previous reasoning on d1. Another from using it on d2.

9-Approximation: Proof Sketch Nonetheless each pre- image on d of the crossing cannot be more than 3e away from it. Thus they cannot be separated along d by more than 6e. We can approximate all these intersections away with a total of 9e.

9-Approximation: Proof Sketch We must also show that if these 6e-regions occur out of order on d we can approximate them away as well. Can be proven through technical case analysis. In the end, incrementally cut off ears from P and map to Q, in order to obtain an overall mapping witnessing dF(P,Q)  9e .

3) Special Variants of Folded Polygons We show that in the following special variants of folded polygons, using L∞, we can map diagonals to shortest paths rather than Fréchet shortest paths. Perpendicular: All diagonals of P are parallel to one axis, and all edges of Q are perpendicular to this axis (and parallel to one of the other axes) Parallel: All diagonals of P and Q are parallel to one axis. Mixed: All diagonals of P and Q are parallel to the x-axis, y- axis, or z-axis.  Use the polynomial-time simple polygons algorithm

Half-Space Lemma Let R be a half space with boundary parallel to the xy-, xz-, or yz-plane. Let Q be a folded polygon with edges parallel to one axis If a (Fréchet shortest) path between two points is completely contained in R so is the shortest path. Q

Half-Space Lemma The proof of the lemma involves checking a few cases to show that no positioning of the edges can “force” the shortest path to go outside of R.

Perpendicular Variant Let P be a folded polygon with all of its diagonals parallel to one axis. Let Q be a folded polygon with all of its edges perpendicular to this axis, and parallel to one of the other axes. For a given diagonal d in P and a Fréchet shortest path, consider any edge e in Q that is crossed by the image curve of d. d e

Perpendicular Variant Take a point on d. Either: It is within e distance to no points on e. It is within e distance to some fixed set of points on e. (2D pictures but similar in 3D)‏ d d e e

Perpendicular Variant We can prove that the shortest path will always cross in the reachable regions on each of the edges using the half- space lemma.

Perpendicular Variant: Proof Sketch The idea is we use these half spaces to represent constraints on the diagonal d that can be mapped to. In the picture the intersection of the half spaces contains exactly those points within e distance of some point on the diagonal d. (using L∞; similar in 3D)‏

Perpendicular Variant: Proof Sketch Since we know some path between these points exists which is completely inside the intersection, we also know that the shortest path between the points is completely inside the intersection.

Perpendicular Variant We can then change the pre-image point of each crossing for an edge so that it maps to the crossing for the shortest path.

Perpendicular Variant We can then change the pre-image point of each crossing for an edge so that it maps to the crossing for the shortest path. Thus, if a diagonal is within Fréchet distance e of any path between two points, then it is also within Fréchet distance e of the shortest path.

Parallel Variant Let P and Q be two folded polygons with all of their diagonals and edges parallel to an axis. For a given diagonal d in P and a Fréchet shortest path, consider any edge e in Q that is crossed by the image curve of d.

Parallel Variant: Proof Sketch Again, by using the half- space lemma we can then show that if some path crosses each edge at a point within distance e of some point on d, so does the shortest path. (Where d is the diagonal we want to map to the shortest path).

Parallel Variant: Proof Sketch Unlike in the perpendicular case, when using the shortest path, the pre- images of the resulting crossing points on the diagonal may occur out of order. If this happens we would no longer have a monotone mapping between the diagonal and the shortest path.

Parallel Variant: Proof Sketch This is similar to the problem we had in the approximation algorithm proof. Unlike before, when we approximated them away, we can actually show that these points can be chosen in order along the diagonal.

Parallel Variant: Proof Sketch This problem arises when the shortest path zigzags back and forth. Using two applications of our lemma we can show that for any pair of edges this zigzag will be no worse for the shortest path than it is for any other path between the same points.

Parallel Variant: Proof Sketch We first choose a point b which lies on the shortest path between a and c and between the problem edges. We can then show the shortest path can't go too far to the right on e1.

Parallel Variant: Proof Sketch Likewise the shortest path can't go too far to the left on e2.

Parallel Variant: Proof Sketch Thus the zigzag of the shortest path is minimal among all paths which cross these edges. We can therefore map diagonals to shortest paths for this variant as well.

Combined Variant This extends to the following case for L∞ : P and Q are folded polygons with all of diagonals and edges parallel to the x-axis, y-axis or z-axis. This variant requires some additional case analysis but is largely similar to the parallel case.  Use the polynomial-time simple polygons algorithm

Conclusion We gave the first results to compute, or approximate, the Fréchet distance for a class of non-flat surfaces (“folded polygons”) Can the approximation factor be improved? Is there a poly-time algorithm for folded polygons? Develop a completely different approach for computing/approximating the Fréchet distance for surfaces?

Thank you

Extra slides

Problem of Tangled Image Curves The image curve for d1 needs to intersect e2 in p2, because it has to map p1 to e1 The image curve for d2 needs to intersect e2 in s Thus d2 intersects e2 before d1 does, which is out of order

Half-Space Lemma The key to proving that shortest paths can be used for these variants lies in showing that this somewhat technical lemma holds.