Download presentation
Presentation is loading. Please wait.
1
The Design and Implementation of Planar Arrangements of Curves in CGAL Iddo Hanniel The research has been carried out at Tel Aviv University under the supervision of Prof. Dan Halperin January 2001
2
Arrangements of Curves Given a collection C of curves in the plane, the arrangement of C is the subdivision of the plane into vertices edges and faces induced by the curves in C
3
Demo 1: Basic Arrangements Operations
4
Arrangements Applications Robot Motion Planning Geographic Information Systems CAD/CAM Assembly Planning Half-plane range searching, maximal discrepancy of a point set, minimal area triangle
5
Previous Arrangement Software Arrange - Arrangements of segments and polygons [Goldwasser 95] LEDA - Planar maps and intersection algorithms [Melhorn & Naher et. al.] MAPC - Manipulation of Algebraic Points and Curves [Manocha et. al. 99] CGAL Planar maps package
6
Novelties of Our Work Arrangement Software Package: General Robust and deals with degeneracies Flexible and Extensible Curve Hierarchy Structure Easy to use Adaptive Point Location: Geometric queries on convex parametric curves Geometric filtering - performing operations on bounding polygons Extensible
7
A GIS Application
8
CGAL - the Computational Geometry Algorithms Library is a collaborative effort of several academic sites in Europe to develop a robust, generic, and efficient C++ library of geometric data structures and algorithms. The generic programming paradigm was adopted to achieve these goals.
9
Planar Maps in CGAL Deal with non-intersecting x-monotone curves. Use a Doubly Connected Edge List (DCEL) representation. Traversal over faces, halfedges and vertices, and traversal over a face and around a vertex. Support different curves through a traits mechanism (can be extended by the user). Different implementations of point location algorithms (can be extended by the user).
10
Geometric Traits The traits class is a template parameter that defines the geometric interface to the class (or function). This enables to use the algorithms with different geometric kernels, and with different types of geometric objects.
11
Planar Map Traits Types: Point, X_Curve Predicates and Functions: Predicates on points, x-monotone curves and on the relationships between them. For example: checking whether a point is above, below or on a curve.
12
Arrangements in CGAL Built on top of the planar map layer. Additions over planar maps: Intersections Non x-monotone curves Maintaining the information on the original curves using what we call a curve hierarchy tree Support of overlapping curves Optional non-update mode
13
Operations Planar map operations: Point Location and Vertical Ray Shooting queries Traversal of planar map faces, edges and vertices Arrangement Operations: Insertion and deletion of intersecting, non-x- monotone curves Tracing edges and subcurves along their original curves Overlaps
14
Curve nodes Subcurve nodes Edge nodes 1 2 3 4 5 6 7 8 56781234 Curve Hierarchy Structure
15
Arrangement Traits Additions over planar map traits: Curve type Functions for detecting non x-monotone curves and splitting them into x-monotone subcurves Intersection functions
16
Arrangement Classes Faces Vertices Halfedges Curves Subcurves Edges Traits Planar mapHierarchy
17
Hierarchy Implementation Base node curve() set_curve() Subcurve node parent() children_begin() children_end() edges_begin() edges_end() Curve_node level_begin(i) level_end(i) number_of_sc_levels() Edge_node halfedge() In_place_list_node next ptr prev ptr begin/end ptr parent ptr
18
Adaptive Point Location
19
Demo 2: Adaptive point location
20
Previous Work Neagu & Lacolle `98 - computing the combinatorial structure of an arrangement of convex Bezier curves. Differences of our work: Point location. Local and adaptive, not global. Connectivity is not assumed. Heauristic to deal with degeneracies. Easily extended framework based on CGAL.
21
P0 P1 P2 P3 C Carrier Polygon Control polygon Conditions on Curves
22
Subdivision of a Convex Curve P0 P2 P P11 P1 P01 T(P) T(P2)T(P0)
23
Vertical Ray Shooting - General Idea Bound the curves by a bounding polygon, and perform all operations on this polygon rather than on the curve itself. If the bounding polygon’s approximation is not sufficient, we refine it by a subdivision process.
24
Ray Shooting: Condition 1 The bounding polygon directly above q (i.e., the result of the vertical ray shooting query in the arrangement of bounding polygons) does not intersect any other polygon.
25
q
26
Intersection Graph 12 3 1 2 3
27
Ray Shooting: Condition 2 Both control and carrier polygons of the bounding polygon are above the query point q.
28
q
29
Point Location Outline Finding the boundary of a simply connected face –Vertical ray shooting –Extending the edges –Isolating intersections Finding the boundary of a face with holes Dealing with degeneracies
30
Boundary Polygons and Intersection Polygons Intersection polygon Boundary polygon
31
Implementation Curve level original curve nodes edges Subcurve level Edge level halfedges vertices faces Planar mapTraits class Intersection graph Hierarchy tree
33
Adaptive Point Location Experiments
34
Trade-off between Different Initializations
35
Canonical Parabolas
36
Comparison of 10 Canonical Parabolas
37
Comparison of 20 Canonical Parabolas
38
Another Application- Boolean Operations
39
Boolean Operations Finding the intersection of N polygons: Label each face in the arrangement of the polygons with a covering number. 0 1 1 2
40
Demo 3: Boolean operations
41
Code for covering_DFS void covering_DFS(Face_handle f) { Ccb_halfedge_circulator start,circ; if (f->outer_ccb_exists()) { start = circ = f->outer_ccb(); do { Face_handle other_face= circ->twin()->face(); if (other_face->covering_num == -1) { int diff = face_diff(circ); other_face->counter = (f->covering_num + diff); covering_DFS(other_face); } } while (++circ != start); }
42
Holes_iterator hit = f->holes_begin(); for(; hit != f->holes_end(); ++hit) { start = circ = *hit; do { Face_handle other_face= circ->twin()->face(); if (other_face->covering_num == -1) { int diff = face_diff(circ); other_face->counter = (f->covering_num + diff); covering_DFS(other_face); } } while (++circ != start); }
43
Future Work Optimization of the arrangement package - improving the internal algorithms. Implementing new traits classes (using filtering schemes, for conic sections) for the arrangement package. Implementing adaptive point location traits to other parametric curves. Packages based on arrangements: generic planar map overlay, fixed precision approximation of arrangements of segments and polygons. Websites: www.math.tau.ac.il/~hanniel/ARRG00/ www.math.tau.ac.il/CGAL/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.