computational geometry
play

Computational Geometry Lecture 1: Introduction and convex hulls 1 - PowerPoint PPT Presentation

Computational Geometry Lecture 1: Introduction and convex hulls 1 Computational Geometry Lecture 1: Introduction and Convex Hulls Geometry: points, lines, ... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space


  1. Computational Geometry Lecture 1: Introduction and convex hulls 1 Computational Geometry Lecture 1: Introduction and Convex Hulls

  2. Geometry: points, lines, ... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space (higher-dimensional), R d A point in the plane, 3-dimensional space, higher-dimensional space. p = ( p x , p y ) , p = ( p x , p y , p z ) , p = ( p 1 , p 2 ,..., p d ) A line in the plane: y = m · x + c ; representation by m and c A half-plane in the plane: y ≤ m · x + c or y ≥ m · x + c Represent vertical lines? Not by m and c ... 2 Computational Geometry Lecture 1: Introduction and Convex Hulls

  3. Geometry: line segments A line segment pq is defined by its two endpoints p and q : ( λ · p x +( 1 − λ ) · q x , λ · p y +( 1 − λ ) · q y ) where 0 ≤ λ ≤ 1 Line segments are assumed to be closed = with endpoints, not open Two line segments intersect if they have some point in common. It is a proper intersection if it is exactly one interior point of each line segment 3 Computational Geometry Lecture 1: Introduction and Convex Hulls

  4. Polygons: simple or not A polygon is a connected region of the plane bounded by a sequence of interior line segments exterior simple polygon polygon with holes convex polygon non-simple polygon The line segments of a polygon are called its edges, the endpoints of those edges are the vertices Some abuse: polygon is only boundary, or interior plus boundary 4 Computational Geometry Lecture 1: Introduction and Convex Hulls

  5. Other shapes: rectangles, circles, disks A circle is only the boundary, a disk is the boundary plus the interior Rectangles, squares, quadrants, slabs, half-lines, wedges, ... 5 Computational Geometry Lecture 1: Introduction and Convex Hulls

  6. Relations: distance, intersection, angle The distance between two points is generally the Euclidean distance: ( p x − q x ) 2 +( p y − q y ) 2 � ( p x − q x ) 2 + ( p y − q y ) 2 � Another option: the Manhattan distance: | p x − q x | + | p y − q y | | p y − q y | Question: What is the set of points at equal Manhattan distance to some | p x − q x | point? 6 Computational Geometry Lecture 1: Introduction and Convex Hulls

  7. Relations: distance, intersection, angle The distance between two geometric objects other than points usually refers to the minimum distance between two points that are part of these objects Question: How can the distance between two line segments be realized? 7 Computational Geometry Lecture 1: Introduction and Convex Hulls

  8. Relations: distance, intersection, angle The intersection of two geometric objects is the set of points (part of the plane, space) they have in common Question 1: How many intersection points can a line and a circle have? Question 2: What are the possible outcomes of the intersection of a rectangle and a quadrant? 8 Computational Geometry Lecture 1: Introduction and Convex Hulls

  9. Relations: distance, intersection, angle Question 3: What is the maximum number of intersection points of a line and a simple polygon with 10 vertices (trick question)? 9 Computational Geometry Lecture 1: Introduction and Convex Hulls

  10. Relations: distance, intersection, angle Question 4: What is the maximum number of intersection points of a line and a simple polygon boundary with 10 vertices (still a trick question)? 10 Computational Geometry Lecture 1: Introduction and Convex Hulls

  11. Relations: distance, intersection, angle Question 5: What is the maximum number of edges of a simple polygon boundary with 10 vertices that a line can intersect? 11 Computational Geometry Lecture 1: Introduction and Convex Hulls

  12. Description size y = m · x + c A point in the plane can be represented using two reals A line in the plane can be false , m, c represented using two reals and a Boolean (for example) A line segment can be represented by two points, so four reals x = c A circle (or disk) requires three reals to store it (center, radius) A rectangle requires four reals to true , .., c store it 12 Computational Geometry Lecture 1: Introduction and Convex Hulls

  13. Description size A simple polygon in the plane can be represented using 2 n reals if it has n vertices (and necessarily, n edges) A set of n points requires 2 n reals A set of n line segments requires 4 n reals A point, line, circle, ... requires O ( 1 ) , or constant, storage. A simple polygon with n vertices requires O ( n ) , or linear, storage 13 Computational Geometry Lecture 1: Introduction and Convex Hulls

  14. Computation time Any computation (distance, intersection) on two objects of O ( 1 ) description size takes O ( 1 ) time! Question: Suppose that a simple polygon with n vertices is given; the vertices are given in counterclockwise order along the boundary. Give an efficient algorithm to determine all edges that are intersected by a given line. How efficient is your algorithm? Why is your algorithm efficient? 14 Computational Geometry Lecture 1: Introduction and Convex Hulls

  15. Algorithms, efficiency Recall from your algorithms and data structures course: A set of n real numbers can be sorted in O ( n log n ) time A set of n real numbers can be stored in a data structure that uses O ( n ) storage and that allows searching, insertion, and deletion in O ( log n ) time per operation These are fundamental results in 1-dimensional computational geometry! 15 Computational Geometry Lecture 1: Introduction and Convex Hulls

  16. Computational geometry scope In computational geometry, problems on input with more than constant description size are the ones of interest Computational geometry (theory): Study of geometric problems on geometric data, and how efficient geometric algorithms that solve them can be Computational geometry (practice): Study of geometric problems that arise in various applications and how geometric algorithms can help to solve well-defined versions of such problems 16 Computational Geometry Lecture 1: Introduction and Convex Hulls

  17. Computational geometry theory smallest enclosing circle Computational geometry (theory): Classify abstract geometric problems into classes depending on how closest pair efficiently they can be solved any intersection? find all intersections 17 Computational Geometry Lecture 1: Introduction and Convex Hulls

  18. Computational geometry practice Application areas that require geometric algorithms are computer graphics, motion planning and robotics, geographic information systems, CAD/CAM, statistics, physics simulations, databases, games, multimedia retrieval, ... Computing shadows from virtual light sources Spatial interpolation from groundwater pollution measurements Computing a collision-free path between obstacles Computing similarity of two shapes for shape database retrieval 18 Computational Geometry Lecture 1: Introduction and Convex Hulls

  19. Computational geometry history Early 70s: First attention for geometric problems from algorithms researchers 1976: First PhD thesis in computational geometry (Michael Shamos) 1985: First Annual ACM Symposium on Computational Geometry. Also: first textbook 1996: CGAL: first serious implementation effort for robust geometric algorithms 1997: First handbook on computational geometry (second one in 2000) 19 Computational Geometry Lecture 1: Introduction and Convex Hulls

  20. Convexity A shape or set is convex if for any two points that are part of the shape, the whole connecting line segment is also part of the shape Question: Which of the following shapes are convex? Point, line segment, line, circle, disk, quadrant? 20 Computational Geometry Lecture 1: Introduction and Convex Hulls

  21. Convex hull For any subset of the plane (set of points, rectangle, simple polygon), its convex hull is the smallest convex set that contains that subset 21 Computational Geometry Lecture 1: Introduction and Convex Hulls

  22. Convex hull problem Give an algorithm that computes the convex hull of any given set of n points in the plane efficiently The input has 2 n coordinates, so O ( n ) size Question: Why can’t we expect to do any better than O ( n ) time? 22 Computational Geometry Lecture 1: Introduction and Convex Hulls

  23. Convex hull problem Assume the n points are distinct The output has at least 4 and at most 2 n coordinates, so it has size between O ( 1 ) and O ( n ) The output is a convex polygon so it should be returned as a sorted sequence of the points, clockwise (CW) along the boundary Question: Is there any hope of finding an O ( n ) time algorithm? 23 Computational Geometry Lecture 1: Introduction and Convex Hulls

  24. Developing an algorithm To develop an algorithm, find useful p properties , make various q observations , draw many sketches to gain insight Property: The vertices of the convex hull are always points from the input Consequently, the edges of the convex hull connect two points of all points lie right of the the input directed line from p to q , Property: The supporting line of any if the edge from p to q is a CW convex hull edge convex hull edge has all input points to one side 24 Computational Geometry Lecture 1: Introduction and Convex Hulls

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend