Lecture 1: Introduction
Total Page:16
File Type:pdf, Size:1020Kb
Lecture Notes CMSC M CMSC M Computer Graphics Spring DaveMount Lecture Intro duction Tuesday Sep What is Computational Geometry Computational geometry is a term claimed bya number of dierent groups The term was coined p erhaps rst by Marvin Minsky in his b o ok Percep trons whichwas ab out pattern recognition and has b een used often to describ e algorithms solidmo deling But its most widely recognized use is to describ e the subeld of algorithm theory that involves the design and analysis of ecient algorithms for problems involving geo metric inputs primarily in or p erhaps consant dimensional spaces It primarily involves straight or at ob jects lines line segments p olygons planes and p olyhedra as opp osed to curves and surfaces It is this latter sense of the term that we will b e covering in this course The eld develop ed rapidly in the late s and through the s and s and it still continues to develop Because of the area from which it grew discrete algorithm design the eld of computational geometry has always emphasized problems of a discrete mathematic nature For most problems in computational geometry the input is a nite set of p oints or other geometric ob jects and the output is a typically some sort of structure consisting of a nite set of p oints or line segments Here is an example of a typical problem called the shortest path problemGiven a set p olygonal obstacles in the plane nd the shortest obstacleavoiding path from some given start p oint toagiven goal p oint Although it is p ossible to reduce this to a shortest path problem on a graph called the visibility graphwhichwe will discuss later this semester and then apply a nongeometric algorithm such as Dijkstras algorithm it seems that by solving the problem in its geometric domain it should b e p ossible to devise more ecient solutions This is one of the main reasons for the growth of interest in geometric algorithms s t s t Figure Shortest path problem The measure of the quality of an algorithm in computational geometry has traditionally b een its asymptotic worstcase running timeThus an algorithm running in O n time is b etter than one running in O n log n time which is b etter than one running in O n time This particular problem can b e solved in O n log ntimeby a fairly simple algorithm and in O n log nby avery complex algorithm In some cases average case running time is considered instead Copyright David M Mount Dept of Computer Science University of Maryland College Park MD These lecture notes were prepared byDavid Mount for the course CMSC Computational Geometryat the University of Maryland College Park Permission to use copymodify and distribute these notes for educational purp oses and without fee is hereby granted provided that this copyright notice app ear in all copies Lecture Notes CMSC M However for manytyp es of geometric inputs it is dicult to dene input distributions that are b oth easy to analyze and representativeoftypical inputs There are many elds of computer science that deal with solving problems of a geometric nature These include computer graphics computer vision and image pro cessing rob otics computeraided design and manufacturing computational uiddynamics and geographic in formation systems to name a few One of the goals of computational geometry is to provide the basic geometric to ols needed from which application areas can then build their programs There has b een signicant progress made towards this goal but it is still far from b eing fully realized Limitations of Computational Geometry There are some fairly natural reasons why compu tational geometry maynever fully address the needs of all these applications areas and these limitations should b e understo o d b efore undertaking this course One is the discrete naturea of computational geometry In some sense any problem that is solved on digital computers must b e expressed in a discrete form but many applications areas deal with discrete approx imations to continuous phenomenon For example in image pro cessing the image maybea discretization of a continuous dimensional grayscale function and in rob otics issues of vibra tion oscillation in dynamic control systems are of a continuous nature Nonetheless there are many applications in which ob jects are of a very discrete nature For example in geographic information systems road networks are discretized into collections of line segments The other limitation is the fact that computational geometry deals primarily with straightor at ob jects To a large extent this is a result of the fact that computational geometers were not trained in geometry but in discrete algorithm design So they chose problems for which geometry and numerical computation plays a fairly small role Much of solid mo deling uid dynamics and rob otics deals with ob jects that are mo deled with curved surfaces However it is p ossible to approximate curved ob jects with piecewise planar p olygons or p olyhedra This assumption has freed computational geometry to deal with the combinatorial elements of most of the problems as opp osed to dealing with numerical issues This is one of the things that makes computational geometry fun to studyy ou do not have to learn a lot of analytic or dierential geometry to do it But it do es limit the applications of computational geometry One more limitation is that computational geometry has fo cused primarily on dimensional problems and dimensional problems to a limited extent The nice thing ab out dimensional problems is that they are easy to visualize and easy to understand But many of the daunting applications problems reside in dimensional and higher dimensional spaces Furthmore issues related to top ology are much cleaner in and dimensional spaces than in higher dimensional spaces Trends in CG in the s and s In spite of these limitations there is still a remarkable array of interesting problems that computational geometry has succeeded in addressing Throughout the s the eld develop ed many techniques for the design of ecient geometric algorithms These include wellknown metho ds such as divideandconquer and dynamic programming along with a numb er of newly discovered metho ds that seem to b e particularly well suited to geometric algorithm These include planesweep randomized incremental constructions dualitytransformations and fractional cascading One of the ma jor fo cuses of this course will b e on understanding technique for designing ecient geometric algorithms A ma jor part of the assignments in this class will consist of designing andor analyzing the eciency of problems of a discrete geometric nature However throughout the s there a nagging gap was growing b etween the theory and practice of designing geometric algorithms The s and early s sawmany of the op en problems of computational geometry solved in the sense that theretically optimal algorithms Lecture Notes CMSC M were develop ed for them However many of these algorithms were nightmares to implement b ecause of the complexity of the algorithms and the data structures that they required Fur thermore implementations that did exist were often sensitive to geometric degeneracies that caused them to pro duce erroneous results or ab ort For example a programmer designing an algorithm that computes the intersections of a set of line segments may not consider the situation when three line segments intersect in a single p oint In this rare situation the data structure b eing used may b e corrupted and the algorithm ab orts Much of the recentwork in computational geometry has dealt with trying to make the the oretical results of computational geometry accessible to practioners This has b een done by simplifying existing algorithms dealing with geometric degeneracies and pro ducing libraries of geometric pro cedures This pro cess is still underway Whenever p ossible we will discuss the simplest known algorithm for solving a problem Often these algorithms will b e randomized algorithms We will also discuss hop efully without getting to o b ogged down in details some of the techniques for dealing with degenerate situations in order to pro duce clean and yet robust geometric software A Grand Overview Here are some of the topics that we will discuss this semester Convex Hulls Convexityisavery imp ortant geometric prop erty A geometric set is convex if for every two p oints in the set the line segment joining them is also in the set One of the rst problems identied in the eld of computational geometry is that of computing the smallest convex shap e called the convex hul l that encloses a set of p oints Convex hull Polygon triangulation Figure Convex hulls and p olygon triangulation Intersections One of the most basic geometric problems is that of determining when two sets of ob jects intersect one another Determining whether complex ob jects intersect often reduces to determining which individual pairs of primitiveentities eg line segments intersect We will discuss ecient algorithms for computing the intersections of a set of line segments Triangulation and Partitioning Triangulation is a catchword for the more general prob lem of sub dividing a complex domain into a disjoint collection of simple ob jects The simplest region into which one can decomp ose a planar ob ject is a triangle a tetrahedron in d and simplex in general We will discuss how to sub divide a p olygon into triangles and later in the semester discuss more general sub divisions into trap ezoids Lowdimensional Linear Programming Many optimization problems in computational geometry can b e stated