Algorithm Engineering (aka. How to Write Fast Code) CS26 S260 – Lecture cture 12 Yan n Gu An Overview of Geometry Processing
What is geometry processing? • Gr Graph h studi dies es the rela latio ionsh nship ip of objects ts • Ge Geometry try studies dies the lo locatio ions ns of the objects ts themse mselv lves es
Lots of real-world applications 3
Every area requires geometry processing Data mining / Database / Data science Data warehouses Machine learning / Artificial intelligence Geometric Information Computational Computer graphics Systems (GIS) biology 4
Computational Geometry • Started in mid 70’s • Focused sed on a abst strac actin ting g the ge geometri tric proble lems, ms, and design ign and analy lysis is of alg lgorit ithms hms for these e proble lems ms • Many y proble lems ms well ll-sol solved ved, , whil ile e many y other proble lems ms remain in open • UC UCR CS R CS 133 133 - Co Computa utationa tional l Ge Geometry try • MIT 6. 6.838 - Ge Geomet etric ic Computat utation ion 5
Good references for sequential geometric algorithms “Four Dutchmen” “The elephant book” Har- Peled’s book 6
Algorithm Engineering O(n log n) O(n) O(log n) Theory Practice • Theory y is is no no lo longe ger suffic fficie ient nt to g guarant antee ee go good theoretic tical al perfo forma mance nce, , becaus ause e comput uter er archite itectu cture e becomes mes sig ignific ificantl antly y more sophi histic sticate ated • Parall llel elism, ism, I/O ef effici ficienc ency, y, new hardw dware re such h as non-vo vola latil tile e memori ories, es, and spec ecific ific applic licat ation ions
Convex Hull, Triangulation, and others 8
Convex hull • A set is convex if every line segment connecting two points in the set is fully contained in the set • Example applications: nearest/farthest point to a line, point 9
How to construct a convex hull • Dozens of algorithms sequentially, a few parallel ones for 2D • Randomized incremental construction • Only requires 𝑷(log 𝒐) rounds if adding all possible points [BGSS SPAA 2020] 1 6 11 5 7 8 2 9 3 4 10 10
What’s triangulation for?
What’s a good triangulation?
Delaunay triangulation (DT) • No points are in the circumcircle of each triangle • Getting practical parallel algorithms for DT is notoriously hard
Delaunay triangulation (DT) • Again, consider the incremental construction
Delaunay triangulation (DT) • Again, consider the incremental construction
Delaunay triangulation (DT) • Again, consider the incremental construction • 2D parallel version is given in [BGSS SPAA 2016 / JACM 2020] • Higher-D version is in [BGSS SPAA 2020] , since 𝒍 -D DT can be subsumed by (𝒍 + 𝟐) -D convex hull
Point location • In a 2D plain, decide which polygon a query point belongs to • Example solution: trapezoidal decomposition (no parallel solution) • Other options: Delaunay refinement 17
Range Searches 18
Example range searches • Nearest neighbor search • Ray-scene intersection queries • 𝒍 -nearest neighbor ( 𝒍 NN) • search Collision detection • Near neighbor counting • etc. • Rectangular range search • Rectangle queries Building blocks in other algorithms / systems • Three-sided queries • Segment (stabbing) queries 19
Classic (sequential) data structures • Quad/octree • 𝒍 -d tree • Interval tree • Segment tree • Range tree • Priority tree • Other augmented trees • R-tree, bounding volume hierarchy (BVH) 20
Why trees? 1 3 E 1 F D C 2 3 C 2 D E F A A B B 21
Each interior tree node acts as a fast-pass check for the subtree nodes • No need to traverse the subtree if the traversal can be pruned 1 3 E 1 1 F D C C 2 2 3 3 NNS C 2 D E F A A B B 22
Each interior tree node acts as a fast-pass check for the subtree nodes • No need to traverse the subtree if the query misses the bounding box 1 3 E 1 1 F D C C 2 2 3 3 C 2 D E F A A A B B B 23
Example range searches • Nearest neighbor search • Ray-scene intersection queries • 𝒍 -nearest neighbor ( 𝒍 NN) • search Collision detection • Near neighbor counting • etc. • Rectangular range search • Rectangle queries • Three-sided queries • Segment (stabbing) queries 24
Classic (sequential) data structures • Quad/octree • 𝒍 -d tree • Interval tree • Segment tree • Range tree • Priority tree • Other augmented trees • R-tree, bounding volume hierarchy (BVH) 25
“Modern” Geometry Problems 26
Problems that are less “classic” (from MIT 6.838) • Clustering • Range searches in “high” (>5) dimensions • Low-distortion embeddings • Geometric algorithms for modern architecture • Geometric algorithms for streaming data 27
Monday lecture (5/18) • Efficient BVH Construction via Approximate Agglomerative Clustering, by Lei Zhang • Parallel Range, Segment and Rectangle Queries with Augmented Maps, by Longze Su Wednesday lecture (5/20) • Theoretically-Efficient and Practical Parallel DBSCAN, by Jinyang Liu • Engineering a compact parallel Delaunay algorithm in 3D, by Haide He 28
Friday lecture (5/22): final project milestone • Every of you will give a 5-minute talk about the current progress of your final project (with slides) • Reserve your time slot here: https://docs.google.com/spreadsheets/d/1De2HOpzUewLK6l aMJqnxF5bahzSBu1fJUR_hSMM9qt8/edit?usp=sharing Paper reading is due this Friday (5/15) 29
Recommend
More recommend