Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung 6 18.05.00.

Slides:



Advertisements
Ähnliche Präsentationen
Algorithmen und Datenstrukturen
Advertisements

Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer, Dr. Gerhard Gröger, Dipl.-Ing. D. Dörschlag Einführung in die Programmierung mit Java.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung Foliendesign: cand. geod. Jörg Steinrücken.
Geoinformation II Vorlesung
Diskrete Mathematik I Vorlesung Arrays-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Übung Diskrete Mathematik SS 2003 Segmentschnitt I.
Institut für Kartographie und Geoinformation Dipl.-Ing. J. Schmittwilken Diskrete Mathe II Übung
Institut für Kartographie und Geoinformation Dipl.-Ing. J. Schmittwilken Diskrete Mathe II Übung
Diskrete Mathe II Übung IKG - Übung Diskrete Mathe II – Jörg Schmittwilken 2 Ü6 Wendet den Scan-Line Algorithmus auf unten stehende Situation.
Analyse von Flüssen in Netzwerken
Klausur „Diskrete Mathematik II“
Institut für Kartographie und Geoinformation Dipl.-Ing. J. Schmittwilken Diskrete Mathe II Übung
Geoinformation II Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik I Vorlesung Listen-
Institut für Kartographie und Geoinformation Diskrete Mathematik I Vorlesung Bäume-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung In welcher Masche liegt der Punkt p?
Diskrete Mathe 9 Vorlesung 9 SS 2001
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 1 SS 2001 Algorithmus von Dijkstra.
Datenstrukturen für Landkarten
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 10 SS 2000 Quadtrees.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 14 WS 2000/2001 Gerhard Gröger ArcToolbox - Konvertierung.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 13 WS 2000/2001 Gerhard Gröger Analyse.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 12 WS 2000/2001 Gerhard Gröger Modellierung mit Geodatabases.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 11 WS 2000/2001 Gerhard Gröger Einführung in ArcInfo 8 -
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 10 WS 2000/2001 Gerhard Gröger Einführung in ArcInfo 8.
Diskrete Mathematik II
Geoinformation I Vorlesung 8 WS 2000/2001 Graphen.
Diskrete Mathematik II
Geoinformation II Vorlesung 2 SS 2001 AVL-Bäume.
Geoinformation II Vorlesung 4 SS 2001 Voronoi-Diagramme.
Modellierung des Raumes
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Objektorientierte Konzepte/UML Geoinformation I Vorlesung 2 WS 2000/2001.
Konstruktion der Voronoi-Diagramme II
Geoinformation II (6. Semester)
Geoinformation II Vorlesung 3 SS 2001 Polygon Overlay.
Diskrete Mathematik II
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 5 SS 2001 Segmentschnitt II (n Segmente)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 9 SS 2000 Punkt-in-Polygon-Verfahren III (R/R + -Baum)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 7 SS 2000 Punkt-in-Polygon-Verfahren I (Trapezkarte)
Konstruktion der Voronoi-Diagramme I
Vorlesung Binärer Suchbaum II-
Vorlesung Mai 2000 Konstruktion des Voronoi-Diagramms II
Geoinformation I Vorlesung 9 WS 2000/2001 DGM (Dreiecksnetze)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation III Vorlesung 1 WS 2001/02 Punkt-in-Landkarte I (Streifenkarte)
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 6 SS 2001 Segmentschnitt III.
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung Mai 2000 Konstruktion des Voronoi-Diagramms.
Diskrete Mathe II Übung
Vorlesung Einführendes Beispiel-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd Foliendesign:
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung April 2000 AVL-Bäume.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik I Vorlesung Rekursion-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Datenstrukturen für den Algorithmus von.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 4 WS 01/02 Quadtrees.
Einführung in die Programmierung mit Java
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik I Vorlesung Binärer Suchbaum III- -AVL-Baum-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Suche des kürzesten Weges in einem Netz.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Voronoi-Diagramme.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer, Dr. Thomas H. Kolbe Einführung in die Programmierung mit Java 9. Vorlesung WS 2001/2002.
Binärer Baum, Binärer Suchbaum I
Geoinformation II 6. Sem. Vorlesung April 2000 Geometrische Algorithmen - ein einführendes, größeres Beispiel für ein Semester-begleitendes Programmier.
Institut für Kartographie und Geoinformation Dipl.-Ing. J. Schmittwilken Diskrete Mathe II Übung
Institut für Kartographie und Geoinformation Diskrete Mathematik I Vorlesung Binärer Suchbaum I-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung 4 4. Mai 2000 Voronoi-Diagramm.
Diskrete Mathematik II
 Präsentation transkript:

Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung Segmentschnitt III

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Reduktion von 2-dim auf 1-dim Überlappung der horizontalen Projektionen ist notwendig, aber nicht hinreichend für einen Schnitt

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line-Verfahren A B F C D E S1S1 S3S3 S2S2 S4S4

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Gegenbeispiel zu viele Elemente gleichzeitig aktiv  O(n 2 )

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Nachbarschaft  - Umgebung A B

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Ordnungsrelation „  x <‘‘ x x‘ B A C A  x < B A  x < C C  x‘ < A C  x < B A  x‘ < B C  x‘ < B

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 A

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 A E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B E A

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B D A E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B C A D E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B D C E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B E C D

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 F C B E D

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B C F E D

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 B C F E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 C E F

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 C F E

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4 C

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Scan-Line & dynamische Ordnung A B F C D E S1S1 S3S3 S2S2 S4S4

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Zusatzfrage: Wann wird der Schnittpunkt S 1 erkannt? A S1S1 Übung: Wird ein Schnittpunkt ggf. mehr als einmal erkannt? C D E B

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Vereinfachende Annahmen Annahme 2 Segmente schneiden sich höchstens in einem Punkt in keinem Punkt schneiden sich mehr als 2 Segmente die x-Koordinaten aller Segmente sind paarweise verschieden kein Segment ist vertikal Gegenbeispiele

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Algorithmus Scan-Line Input: S: eine Menge von Segmenten Output: die Schnittpunkte der Elemente von S Sei T = Endpunkte der Segmente von S nach x-Koordinaten sortiert (Haltepunkte) L =  // aktive Segmente von S while T   do bestimme und entferne den nächsten Punkt p  T x ist x-Koordinate von p case: p ist linker Endpunkt von s fuege_ein(s,x,L) sl = vorgaenger(s,x,L) sr = nachfolger(s,x,L) schnitt(sl,s,T); schnitt(s,sr,T); p ist rechter Endpunkt von s sl = vorgaenger(s,x,L) sr = nachfolger(s,x,L) entferne(s,x,L) schnitt(sl,sr,T) p ist Schnittpunkt von s und t vertausche(s,t,L,x) // t < s sl = vorgaenger(t,x,L) sr = nachfolger(s,x,L) schnitt(sl,t,T) schnitt(s,sr,T)

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Algorithmus (II) fuege_ein(s,x,L): fügt das Segment s in die Menge L ein entsprechend der Ordnung an der Stelle x entferne(s,x,L): entfernt das Segment s aus L an der Stelle x nachfolger(s,x,L):liefert den Nachfolger von s in L an der Stelle x, falls vorhanden vorgaenger(s,x,L): liefert den Vorgänger von s in L an der Stelle x, falls vorhanden schnitt(s,t,T):prüft s und t auf Schnitt. Berechnet ggf. den Schnitt- punkt p und fügt ihn als neuen Haltepunkt in T ein. offene Probleme:eine geeignete Datenstruktur für T eine geeignete Datenstruktur für L Prüfung auf Schnitt, Berechnung des Schnittpunkts

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Datenstrukturen für T und S Datenstrukur für T –AVL-Baum –letztes Semester was ist ein AVL-Baum –erstens ein Suchbaum –zweitens ausgeglichen Datenstruktur für L –AVL-Baum? –Problem: „Vorgänger“ und „Nachfolger“ finden das wird vom AVL-Baum nicht unterstützt –also: Variante des AVL-Baums alle Informationen sind in Blättern (nicht in inneren Knoten) die Blätter bilden eine doppelt verkettete Liste

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung Eine Variante des AVL-Baums mit einer doppelt verketteten Liste der Blätter für die Menge der aktiven Elemente

Lutz Plümer - Diskrete Mathematik II - SS Vorlesung für die Haltepunkte......mit den Operationen –Einfügen eines gefundenen Schnittpunktes –Finden und Entfernen des nächsten (also minimalen) Elements genügt ein „normaler“ AVL-Baum obwohl man mit Kanonen auf Spatzen schießt besser: ein Heap (wie bei Dijkstra)