240 likes | 350 Views
Walking Algorithms for Point Location. Roman Soukal Ivana Kolingerová. Point Location. Fundamental problem in Computational Geometry Triangulations, Tetrahedronizations, Pseudotriangulations, Voronoi Diagrams etc. A lot of applications Geographic Information Systems (GIS)
E N D
Walking Algorithms for Point Location Roman Soukal Ivana Kolingerová
Point Location Fundamental problem in Computational Geometry Triangulations, Tetrahedronizations, Pseudotriangulations, Voronoi Diagrams etc. A lot of applications Geographic Information Systems (GIS) Computer Aided Design (CAD) Computer Graphics Motion Planning Etc. Explanation of Figure 1.: Query Triangle Query Point Figure 1: Point Location in Triangulation Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
The most effective solutions Expected computation complexity O(log n) where n is a number of elements in a mesh Sophisticated structures are required DAG, skip list, quadtree, octree, random sampling Disadvantages Memory demands (usually O(n)) Difficult implementation (especially implementation of modifications) Etc. Alternative solutions Walking location algorithms Computational complexity to [De01] Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Explanation of Figure 2.: Visited Triangle Query Point Path of walking algorithm Walking algorithms • Location of an element (the element which contains the query point) using walking through neighboring elements • No extra data structures – it needs only information about connectivity • Types of walking algorithms • Visibility walk • Straight walk • Orthogonal walk Figure 2: Point location in triangulation using walking algorithms Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Performed research • Triangulation • Visibility walk • Straight walk • Orthogonal walk • Tetrahedronisation • Visibility walk • Pseudotriangulation • Special modification of Visibility walk [Tr08] • Choice of the first element[Mu99] Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Visibility walk in E2 Fixed orientation of Δ Determinant test Simple implementation Figure 3: Point location in triangulation using Visibility walk algorithm Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Remembering Stochastic walk in E2 “Stochastic” – otherwise only Delaunay Triangulation “Remembering” Figure 4: Point location in the triangulation using Remembering Stochastic walk algorithm Figure 5: Visibility walk may loop on a non-Delaunay triangulation Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Improvement of Remembering Stochastic walk by I. Kolingerova Remembering Stochastic walk 1 or 2 edge tests per triangle Average 1,4 Improvement 1 edge test per triangle (about 40% fewer edge tests) How to find the query triangle? Direction Query Point Loop Figure 6: Looping in Improvement of Remembering Stochastic walk Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Improvement of Remembering Stochastic walk by [Ko06] • Existed solutions for looping • [Ko06] – Using standard Remembering Stochastic walk algorithm for final location • Flag – Needs modification of structure • Solution • Distance control after A iterations where A is a constant depended on N • New possible solutions? Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Original Straight walk Two steps of algorithm Initialization step Straight walk step Determinant orientation test is used Goals Simplify initialization step Use faster tests than determinant orientation tests Roman Soukal – Walking Algorithms for Point Location
Straight walk example Explanation of Figure 5.: Triangle on Initialization step Path of Initialization step Triangle on Straight walk Path of Straight walk Line pq • Initialization step - 1 Determinant orientation test • Straight walk step – 2 Determinant orientation tests Figure7: Original Straight walk Roman Soukal – Walking Algorithms for Point Location
Modified Straight walk Roman Soukal – Walking Algorithms for Point Location • The initialization step is simplified to constant number of operations • Implicit line equation test is used
Explanation of Figure 6.: Triangle on Straight walk Path of Straight step Triangle on Visibility walk Path of Visibility walk Line pq Normal line Figure8: Modified Straight walk Modified Straight walk Example • Initialization step • Implicit line equation test for pq • Problem and solution Roman Soukal – Walking Algorithms for Point Location
Length of Remembering Stochastic Walk in Straight walk Table 1: The properties of final location with Remembering Stochastic walk Roman Soukal – Walking Algorithms for Point Location
Pilot point of the last triangle inStraight walk Path ofRemembering Stochastic walk Query point Last triangle ofStraight walk Pilot line Control normal Direction of walking Path ofStraight walk Starting point Solution • Remembering Stochastic walk for final location • 2 solutions • Distance • Normal • Normal is faster Figure 9: Normal Straight walk Roman Soukal – Walking Algorithms for Point Location
Walking direction Orthogonal walk Startingpoint of walking forax X • Best result • Why? • Practical application • Dynamic Delaunay triangulation for kinetic data • Terrain deformation for virtual reality • Faster up to 15 % Ax ofwalkingin X Ax of walking in Y Last triangle of walking in X and starting triangle of walking in Y Path of Orthogonalwalk Query point Path of Remembering Stochastic walk Figure10: Point location in triangulation using Orthogonal walk Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
How to choose the first element? • [Mu99] – We choose the closest element from the set • The set contains some randomly selected elements from mesh • How big must be this set? • Depends on the speed of the algorithm • The size of the set: Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Direction of walking Query point Figure11: Point location in triangulation made on Arc Is there a speedup on all types of datasets? • Tests on DT made on different datasets • Random generated points in square • Clusters • Grid • Gauss • Arc • 100, 200, 500, 1000, 2000, 5000, 104, 2*104, 5*104, 105, 2*105, 5*105, 106, 2*106 points in dataset Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Results Speedup up to 350-550% Table 2: Speedup with the optimal choice of the first element (time of location of 10000 points) Intel Pentium D 3GHz 2x2MB L2 Cache, 3GB RAM Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Remembering Stochastic walk in E3 • Determinant test Figure 12: Walking in tetrahedra mesh Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Conclusion E2 The best is Orthogonal walk Expected computational complexity down to E3 The best is Remembering Stochastic walk for E3 Expected computational complexity down to Pseudotriangulations Figure13: Results of chosen algorithms Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Future work • Tests of properties on non-Delaunay triangulations (regular, greedy, etc.) • Tests of hierarchical structures Roman Soukal – Walking Algorithms for Point Location
The most important references • [De01] Devillers, O., Pion, S., Teillaud, M. , 2001. Walking in a Triangulation. International Journal of Foundations of Computer Science. • [Fl91] L. D. Floriani, B. Falcidieno, G. Nagy, C. Pienovi: On sorting triangles in Delaunay tessellation, Algorithmica 6, 1991 • [Mu99] Mücke, E. P., Saias, I., Zhu, B., 1999. Fast Randomized Point Location without Preprocessing in Two- and Three-dimensional Delaunay Triangulations. Computational Geometry: Theory and Applications. • [Ko06] Kolingerová, I., 2006. A Small Improvement in the Walking Algorithm for Point Location in a Triangulation. 22nd European Workshop on Computational Geometry. • [Tr08] Trčka, J., Kolingerová, I., 2008.The Stochastic Walk Algorithm for Pseudotriangulations. Draft. Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location
Thank you for your attention… Questions? Roman Soukal – Walking Algorithms for Point Location Roman Soukal – Walking Algorithms for Point Location