computational geometry
play

Computational Geometry Lecture 2b: Subdivision representation and - PowerPoint PPT Presentation

Motivation Doubly-connected edge list Map overlay Subdivision representation and map overlay Computational Geometry Lecture 2b: Subdivision representation and map overlay Computational Geometry Lecture 2b: Subdivision representation and map


  1. Motivation Doubly-connected edge list Map overlay Subdivision representation and map overlay Computational Geometry Lecture 2b: Subdivision representation and map overlay Computational Geometry Lecture 2b: Subdivision representation and map overlay

  2. Motivation Doubly-connected edge list Map overlay Map overlay Map overlay Map overlay is the combination of two (or more) map layers It is needed to answer questions like: What is the total length of roads through forests? What is the total area of corn fields within 1 km from a river? What area of all lakes occurs at the geological soil type “rock”? Computational Geometry Lecture 2b: Subdivision representation and map overlay

  3. Motivation Doubly-connected edge list Map overlay Map overlay Map overlay To solve map overlay questions, we need (at the least) intersection points from two sets of line segments (possibly, boundaries of regions) Computational Geometry Lecture 2b: Subdivision representation and map overlay

  4. Motivation Doubly-connected edge list Map overlay Map overlay Map overlay rock rock sand loess clay clay sand To solve map overlay questions, we also need to be able to represent subdivisions rock rock sand loess clay clay sand Computational Geometry Lecture 2b: Subdivision representation and map overlay

  5. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Subdivisions A planar subdivision is a structure induced by a set of line segments in the plane that can only intersect at common endpoints. It consists of vertices, edges, and faces edge vertex face Computational Geometry Lecture 2b: Subdivision representation and map overlay

  6. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Subdivisions Vertices are the endpoints of the line segments Edges are the interiors of the line segments Faces are the interiors of connected two-dimensional regions that do not contain any point of any line segment Objects of the same dimensionality are adjacent or not; objects of different dimensionality are incident or not adjacent incident Computational Geometry Lecture 2b: Subdivision representation and map overlay

  7. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Subdivisions Exactly one face is unbounded, the outer face Every other face is bounded and has an outer boundary consisting of vertices and edges Any face has zero or more inner boundaries Computational Geometry Lecture 2b: Subdivision representation and map overlay

  8. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Subdivisions Vertices, edges, and faces form a partition of the plane If a planar subdivision is induced by n line segments, it has exactly n edges, and at most 2 n vertices Computational Geometry Lecture 2b: Subdivision representation and map overlay

  9. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Subdivisions And how many faces? Observe: Every face is bounded by at least 3 edges, and every edge bounds at most 2 faces ⇒ F ≤ 3 · ( E / 2 ) = 3 n / 2 = O ( n ) Exception: there are less than 3 edges, and the only face is the outer face Computational Geometry Lecture 2b: Subdivision representation and map overlay

  10. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Euler’s formula Euler’s formula for planar graphs: If S is a planar subdivision with V vertices, E edges, and F faces, then V − E + F ≥ 2 , with equality iff the vertices and edges of S form a connected set V = 9 , E = 10 , F = 4 V = 11 , E = 12 , F = 4 V − E + F = 3 V − E + F = 2 Computational Geometry Lecture 2b: Subdivision representation and map overlay

  11. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions A subdivision representation has a vertex-object class, an edge-object class, and a face-object class It is a pointer structure where objects can reach incident (or adjacent) objects easily Computational Geometry Lecture 2b: Subdivision representation and map overlay

  12. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions v 2 Use the edge as the central object For any edge, exactly two vertices f 2 f 1 are incident, exactly two faces are incident, and zero or more other v 1 edges are adjacent Computational Geometry Lecture 2b: Subdivision representation and map overlay

  13. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions v destination Use the edge as the central object, and give it a direction f right f left Now we can speak of Origin, Destination, Left Face, and Right v origin Face Computational Geometry Lecture 2b: Subdivision representation and map overlay

  14. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions next edge next edge for f right for f left Four edges are of special f right f left interest previous edge previous edge for f right for f left Computational Geometry Lecture 2b: Subdivision representation and map overlay

  15. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions It would be nice if we could traverse a boundary cycle by continuously following the next edge for f left or f right ... but, no consistent edge orientation needs to exist Computational Geometry Lecture 2b: Subdivision representation and map overlay

  16. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure Representing subdivisions We apply a trick/hack/impossibility: split every edge length-wise(!) into Next( � e ) two half-edges Every half-edge: � e Twin( � e ) has exactly one half-edge as its Twin Prev( � e ) is directed opposite to its Twin is incident to only one face (left) Computational Geometry Lecture 2b: Subdivision representation and map overlay

  17. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure The doubly-connected edge list The doubly-connected edge list A half-edge object stores: is a subdivision representation structure with an object for Origin (vertex) every vertex, every half-edge, Twin (half-edge) and every face IncidentFace (face) Next (half-edge in cycle A vertex object stores: of the incident face) Coordinates Prev (half-edge in cycle IncidentEdge (some of the incident face) half-edge leaving it) Computational Geometry Lecture 2b: Subdivision representation and map overlay

  18. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure The doubly-connected edge list A face object stores: OuterComponent f (half-edge of outer cycle) InnerComponents (list of half-edges for the inner cycles bounding the face) Computational Geometry Lecture 2b: Subdivision representation and map overlay

  19. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure The doubly-connected edge list Next( � e ) Question: A half-edge � e can directly Twin( � e ) � e access its Origin , and get the coordinates of one endpoint. How Origin( � e ) Prev( � e ) can it get the coordinates of its other endpoint? Question: For a vertex v , how do we find all adjacent vertices? v Computational Geometry Lecture 2b: Subdivision representation and map overlay

  20. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure The doubly-connected edge list A vertex object stores: Coordinates A half-edge object stores: IncidentEdge Origin (vertex) Any attributes, mark bits Twin (half-edge) IncidentFace (face) A face object stores: Next (half-edge in cycle OuterComponent of the incident face) (half-edge of outer cycle) Prev (half-edge in cycle InnerComponents of the incident face) (half-edges for the inner Any attributes, mark bits cycles) Any attributes, mark bits Computational Geometry Lecture 2b: Subdivision representation and map overlay

  21. Motivation Subdivisions Doubly-connected edge list Representing subdivisions Map overlay DCEL structure The doubly-connected edge list Question: For a face f , how do we find all adjacent face names, assuming they are stored in an attribute? Write the code using the proper names like Next , OuterComponent , etc. Computational Geometry Lecture 2b: Subdivision representation and map overlay

  22. Motivation Initialization Doubly-connected edge list Overlay algorithm Map overlay Boolean operations Map overlay problem The map overlay problem for two subdivisions S 1 and S 2 is to compute a subdivision S that is the overlay of S 1 and S 2 All edges of S are (parts of) edges from S 1 and S 2 . All vertices of S are also in S 1 or S 2 , or intersections of edges from S 1 and S 2 Computational Geometry Lecture 2b: Subdivision representation and map overlay

Recommend


More recommend