# Computational Geometry - SS 19

Where should you place a new cell phone transmitter in a city such that its coverage area does not overlap with other, existing cell phone transmitters? How should you connect the nodes of a height field such that you obtain a plausible 3D terrain? How can you compress images very easily and still get a decent compression rate? (JPEG achieves very good compression rates, but it also is very complex.)

In recent years, methods from computational geometry have been widely adopted in various fields of practical computer science, yielding elegant and efficient algorithms. This course aims at endowing practitioners with a working knowledge of a wide range of algorithms, methods, and tools from computational geometry. It will enable attendees to recognize geometric problems in their respective field of work and select the most suitable data structure. In the course, I will show this with a number of examples, which are mostly situated in the area of visual computing.

The course will focus on geometric algorithms and data structures that have proven to be versatile, efficient, fundamental, and easy to implement. Thus, students will benefit immediately from this course, if they are interested in areas such as computer graphics, computer vision, robotics, machine learning, spatial databases, visualization, simulation, and many others.

This course is for you, if you want to acquire ...

1. Knowledge and mastering of some of the geometric data structures that are very important for many methods in a lot of areas of practical computer science (see above).
2. In-depth insights into the reasons why algorithms become very efficient by using these data structures.
3. Knowledge of some applications of these data structures in visual computing.
4. Some skills in proving the correctness and complexity analysis of geometric algorithms.

There are no formal prerequisites for this course; it is self-contained. It does not require knowledge of mathematics beyond high school algebra, but it does assume that students are comfortable with rigorous thinking and with proving theorems and properties of algorithms. If you have attended my computer graphics course in the Bachelor's program (CG1), then your feelings towards the chapter on triangulation can serve as an indicator whether or not this course will be interesting and rewarding to you.

Some of the envisioned topics (these might change a little during the semester):

1. Quadtrees / octrees, texture compression, isosurfaces, terrain visualization.
2. Kd-trees, texture synthesis, point cloud surfaces.
3. BSP trees, boolean operations on solids.
4. Bounding volume hierarchies.
5. Kinetic data structures, collision detection.
6. Convex hulls.
7. Voronoi and Delaunay diagrams, facility location problems, approximation to the TSP.
8. Range-trees and priority-search trees, range queries on the grid.
Note: the exact combination of topics will be modified a little bit each time.

This course is at the intersection of computational geometry and practical computer science. Therefore, we will not assign practical, but only (easy) theoretical exercises.

### News

Change of room: Wednesday 8:30 - 10:00 in MZH 1460.
Starting time: 8:30

### Topics

The following table contains the topics presented in class.

Week Topics Notes Assignments
GZ 1
2. Easter week (no lectures)
3. Quadtrees 2: meshing for integer polylines using quadtrees, complexities, aspect ratio of traingles, meshing for arbitrary polylines, variants of quadtrees/octrees and generalizations, storage and implemenation, space-filling curves, Z-order curve, Morton codes, point location problem V 2
GZ 2
Assignment 1
4. May 1 (no lectures)
5. Sphere packings and sphere trees: bounding volume hierarchies, simultaneous traversal, sphere packings, the sausage catastrophe, protosphere, inner sphere trees, collisions with point clouds, theoretic bounds on colliding spheres.
Hierarchical grids: k-free triangle soups, kDet
V 2.1
Slides
Assignment 2
6. Applications of quadtrees: image compression, isosurfaces: definition, marching cubes, acceleration using octrees; interlude: solving stabbing queries using the span space; isosurfaces for time-varying scalar fields. V 3
GZ 3
7. Closest Pairs algorithm.
Kd-Trees: definition, construction, complexity of the construction, variants of kd-trees, Nearest-neighbor (NN) search using kd-trees, curse of dimensionality.
GZ 4
8. Digression: four-dimensional geometric thinking.
Approximate nearest neighbor (ANN) search: algorithm, correctness, time complexity; "best" ANN algorithms (randomized kd-tree, RKD forest), experimental results;
Applications: texture synthesis, iterative closest points (ICP), implicit surfaces over point clouds using weighted moving least squares,
Lab meeting
V 5
GZ 5
9. BSP-Trees: definition, examples, construction algorithm, complexity of BSPs (expected size and construction running time), simple applications of BSPs (ray shooting, hidden surface elimination) Construction of good BSPs using heuristics: cost function, case of known query distributions, deferred and self-organizing BSP trees.
BSPs representing polyhedra, Boolean operations (CSG operations) on solids using the BSP representation
GZ 6 Assignment 3
10. Kinetic data structures: general algorithmic technique, tournament tree (kinetic heap),
Bounding volume hierarchies: definition of BVHs, tightness metrics for BVs, construction using insertion strategy (= Salmon-Goldsmith), surface area heuristic (SAH), top-down construction, construction in configuration-space using kd-trees, application of k-DOPs for ray-tracing, different kinds of BVs,
V 7
GZ 7
11. Convex hulls: definition, constructive proof for CH over sets of points, construction in 2D (Graham's scan), lower bound on complexity, more properties, convex combinations, Euler's equation and application to polyhedra, construction of the CH in 3D (Clarkson-Shor's algorithm),
Assignment meeting
GZ 8
12. Geometric predicates: left/right, positive/negative orientation, positive/negative volume, extremal point in a convex polygon.
Akl-Toussaint heuristic for convex hulls, Demos and applications of convex hulls (coll.det.).
Voronoi diagrams (VD): definition, examples, and basic properties; lemma of the expanding circle, relationship between VD's and the convex hull, complexity of the VD.
GZ 9 GZ 10 Assignment 4
13. Delaunay triangulations (DT): definition of triangulations, defintion of DT's as dual of the Voronoi diagram, simple properties, Thales theorem and edge flips, theorem on the maximal minimal angle of DT's, construction of 2D Delaunay triangulations. GZ 11
14. Applications of VD's and DT's: post-office problem, connection between NNG(S) and DT(S), connection between MST(S) and DT(S), finding the largest empty circle.
Generalizations of Voronoi diagrams (higher-order sites, power diagram, additive weights, different norms, etc.).
More applications of VD's: redistricting, the cones trick for approximate VD's,
GZ 12

The notes named "V" have been written and are by courtesy of Vanessa Hassouna (thank you so much!), those named "GZ" are my own. (Unfortunately, I have them only in German, I translate them during the lecture on the fly - sorry about that.)

Here are the slides I presented throughout the course. Please consider only those that I covered in class. All other slides are purely for your entertainment, if you'd like to go through them.

### Literature

• Mark de Berg, Otfried Cheong, Marc van Kreveld, Mark Overmars: Computational Geometry: Algorithms and Applications; Springer. (The so-called Dutch Book) Available online at Springer.
• Franco P. Preparata, Michael Ian Shamos: Computational Geometry: An Introduction; Springer
• Rolf Klein: Algorithmische Geometrie: Grundlagen, Methoden, Anwendungen; Springer
• Joseph O'Rourke: Computational Geometry in C. Cambridge University Press
• G. Zachmann & E. Langetepe: Geometric Data Structures for Computer Graphics CRC Press, 2006, ISBN: 9781568812359 (in the past AK Peters)
Here is an electronic preprint of the book. You will get the password on request, if you attended class.
You should also be able to find a hardcopy in the SuUB.
• Satyan L. Devadoss, Joseph O'Rourke: Discrete and Computational Geometry. Princeton University Press. (chapter 1 on triangulation)