Geometric Algorithms for Object Placement and Planarity in a Terrain
Total Page:16
File Type:pdf, Size:1020Kb
Geometric Algorithms for Object Placement and Planarity in a Terrain Rahul Ray Max-Planck Institut fur¨ Informatik Geometric Algorithms for Object Placement and Planarity in a Terrain Geometric Algorithms for Object Placement and Planarity in a Terrain Rahul Ray Dissertation zur Erlangung des Grades Doktor der Ingenieurwissenschaften (Dr.-Ing.) der Naturwissenschaftlich-Technischen Fakultat¨ I der Universitat¨ des Saarlandes Saarbruck¨ en July 27th, 2004 Max-Planck Institut fur¨ Informatik Tag des Kolloquiums: 27 July 2004 Dekan: Prof. Dr. Philipp Slusallek Gutachter: Prof. Dr. Kurt Mehlhorn Prof. Dr. Stefan Schirra Dedicated to my parents Acknowledgements Many people have taught, inspired, encouraged, supported, helped and advised me during the time in which I worked on this thesis. I wish to express my deepest gratitude to all of them, without which this thesis would never happen. First of all, I would like to thank my advisor, Prof. Dr. Kurt Mehlhorn, for providing me a perfect balance of scientific guidance and scientific freedom. He has always been a great source of motivation whenever I needed. I would like to thank him for creating a wonderful research atmosphere in Max-Planck Institut fur¨ Informatik, Saarbruck¨ en. I also wish to thank Dr. Stefan Funke and Dr. Theocharis Malamatos for co-guiding my research work that led to this thesis. They are great persons to work with and I consider myself privileged to have collaborated with them in my research. I share some of the most enjoyable moments in MPI with them which came along during many of our enlighting discussions or exchanges of innu- merable emails. They also helped me in proof-reading this thesis manuscript and improving the presentation a lot. When I go back to my uninteresting days in industry, I shall never forget Prof. Michiel Smid who gave me an opportunity to think about a PhD option. I am grateful to him for infinite number of reasons. He introduced me to the planarity problem in terrain and many other interesting aspects of it while I was in Magdeburg University (Germany). I am thankful to ever smiling Prof. Ulrich Wendt for his wonderful collaboration from material science department in our project. I learned a lot from my co-authors, whose ideas and insightful suggestions were invaluable in discovering many of the algorithms presented in this thesis. My sincere thanks to them. I thank Prof. Stefan Schirra for kindly agreeing to review the thesis and to act as an examiner. I would like to thank and express my sincere gratitude to Suman Mukherjee, who pur- suaded me to continue this research at a time I thought to abandon it. My friend Arnab Paul has always kept on inspiring me even before I started my research. All my friends in Tajmahal, Chhannachhara have been a constant source of inspiration for me to finish this thesis one day. My special thanks to them. My MPII experience would not be the same without my friends, colleagues and office- mates (categories not mutually exclusive). I thank Naveen Sivadasan, Debapriyo, Hisao, Venkatesh, Tobias, Ingmar, Christian, Holgar, Kerstin, Petra, Arno, Nicola, Kavitha, Sunil and many others who are/were my colleagues in various times in MPII for their friendly help and making my life fun and enjoyable. I express my gratitude and thanks to Deb, Sudip, Chandrima, Pintu, Raja, Sai, Reddy, Venkat, Fawad, Tarang, Hareesh and many others in Saarcricket Club for providing wonderful social interaction which has tunred my stay in Saarbruck¨ en an unforgettable event in my life. x Finally, I would like to thank those whom I owe the most. My parents have always en- couraged me to pursue higher studies even when I was in a kindergarten !! They have greatly influenced my life with love and guidance and most importantly freedom of my soul which allowed me to reach where I am now. My then class mate and now wife, Piyali, was a great emotional support for me, whether it was a time for hard work or for taking it easy. To mark the submission of this thesis, we were blessed with a baby son, Rishav, on 22nd April. I gratefully acknowledge the fellowship from International Max-Planck Research School (IMPRS) , that supported my research at Max-Planck Institut fur¨ Informatik, Saarbruck¨ en. Abstract We consider the following placement problem: Let C be a compact set in R2 and let S be a set of n points in R2. The objective is to compute a translate of C that contains the maximum number, κ∗, of points of S. Motivated by the applications in clustering and pattern recognition, this optimal placement problem has received much attention over the last two decades. It is known that this problem can be solved in a time that is roughly quadratic in n. We show for a given " > 0 how random-sampling and bucketing techniques can be used to develop a near-linear-time Monte Carlo algorithm that computes a placement of C containing at least (1 ")κ points of S with high probability. − ∗ When C is a unit disk, we give an approximation algorithm for the optimal placement problem by approximating the constraining radius of the disk. Here, our algorithm computes a placement of the disk of radius (1 + ") which contains at least κ∗ points, where κ∗ denotes the maximum number of points covered by any unit disk. The running time of this algorithm is O(n="2). Then, we turn to the problem of computing the largest connected region in a triangulated terrain of size n for which the normals of the triangles deviate by at most some small fixed angle. We devise an exact algorithm by adapting dynamic graph connectivity algorithm to compute the largest planar region in O(n2 log n(log log n)3) time. We also give a heuristic that can be used to compute sufficiently large planar regions in a terrain much faster. We discuss an implementation of this heuristic, and show some experimental results for terrains representing three-dimensional (topographical) images of fracture surfaces of metals obtained by confocal laser scanning microscopy, which directly motivated our research into this direction. Since the output of this heuristic comes with no quality assurance, we present a new ap- proximation scheme for the same problem which apart from giving a guarantee on the quality of the produced solution also has been implemented in practice and shows good performance on real-world data representing fracture surfaces. This approximate deterministic algorithm computes in O(n="2) time the largest approximately connected planar region in the terrain. We also give a variant of the above algorithm with a better dependence on " at the cost of an extra poly-logarithmic factor on n. For a sufficiently large n, both the algorithms consume optimal O(n) space. Kurzzusammenfassung Wir betrachten das folgende Platzierungsproblem: Sei C eine kompakte Menge im R2 and S eine Menge von n Punkten im R2. Das Ziel ist es, ein Verschiebung von C zu berechnen, welche eine maximale Anzahl κ∗ an Punkten aus S enthalt.¨ Aufgrund zahlreichen Anwendun- gen im Clustering und in der Mustererkennung wurde dieses Problem in den letzten Jahrzehn- ten oft betrachtet. Es gibt bekannte Algorithmen, die dieses Problem in fast-quadratischer Zeit losen.¨ Wir prasentieren¨ einen Monte-Carlo Algorithmus, der fur¨ ein gegebenes " > 0 in fast- linearer Zeit eine Platzierung von C berechnet, welche mindestens (1 ")κ Punkte aus S − ∗ mit hoher Wahrscheinlichkeit enthalt.¨ Unser Algorithmus basiert auf der Entnahme zufalliger¨ Stichproben und Bucketingtechniken. Im Falle, dass C eine Einheitskreisscheibe ist, stellen wir einen Approximationsalgorith- mus fur¨ das Plazierungsproblem vor, wobei wir den Radius der Kreisscheibe relaxieren. So erhalten wir eine Platzierung einer Kreisscheibe mit Radius (1 + ") welche mindestens κ∗ Punkte enthalt.¨ Hierbei bezeichnet κ∗ die maximale Anzahl von Punkten, die von einer Ein- heitskreisscheibe uberdeckt¨ werden konnen.¨ Die Laufzeit dieses Algorithmus ist O(n="2). Danach betrachten wir das Problem, die grosste¨ zusammenhangende¨ Region in einem tri- angulierten Terrain der Grosse¨ n zu berechnen, fur¨ welche die Dreiecksnormalen der Re- gion um nicht mehr als einen vorgegebenen Winkel abweichen. Wir prasentieren¨ einen ex- akten Algorithmus, der auf einer Datenstruktur zur dynamischen Verwaltung von Zusammen- hangskomponenten eines Graphen basiert und das Problem in O(n2 log n(log log n)3) Zeit lost.¨ Wir stellen auch eine heuristische Losung¨ vor, die schnell relativ grosse planare Regio- nen berechnet. Diese Heuristik wurde implementiert und experimentell evaluiert. Dazu lagen uns dreidimensionale topografische Daten von Bruchoberflachen¨ verschiedenster Metallsorten vor. Diese Anwendung war auch die ursprungliche¨ Motivation fur¨ unsere Forschung. Da diese Heuristik jedoch keinerlei Qualitatsgarantie¨ fur¨ die berechnete Region liefert, stellen wir schliesslich ein neues Approximationsschema vor, welches sowohl eine garantierte Gute¨ liefert, als auch praktisch implementiert wurde und auf unseren Testdaten gute Resultate erzielte. Die Laufzeit dieses Approximationsalgorithmus ist O(n="2). Contents 1. Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.1 Placement Problem . 2 1.1.1 Problem Definition . 2 1.1.2 Motivation and State of the Art . 2 1.1.3 Main Results . 3 1.2 Planarity in a Terrain . 4 1.2.1 Problem Definition . 4 1.2.2 Motivation . 4 1.2.3 Main Results . 5 1.3 Finding Large Planar Regions in a Terrain with a Guarantee . 6 1.3.1 Problem Definition . 6 1.3.2 Main Results . 6 2. Placement Algorithms : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 2.1 Introduction . 9 2.2 Model of Computation . 10 2.3 Overview of Results . 11 2.4 Preliminaries and Exact Algorithms . 12 2.4.1 Bucketing and Estimating κ∗(C; S). 15 2.4.2 A Bucketing Algorithm . 16 2.5 Monte-Carlo Algorithms . 17 2.5.1 A Random Sampling Approach . 17 2.5.2 Bucketing and Sampling Combined .