1 / 43

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. The Design and Implementation of Planar Arrangements of Curves in CGAL. January 2001. Arrangements of Curves.

hestia
Download Presentation

The Design and Implementation of Planar Arrangements of Curves in CGAL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Iddo Hanniel The researchhas been carried out at Tel Aviv University under the supervision of Prof. Dan Halperin The Design and Implementation of Planar Arrangements of Curves in CGAL 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 Hierarchy Structure 1 5 2 6 7 3 4 8 Curve nodes Subcurve nodes Edge nodes 1 2 3 4 5 6 7 8

  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 Planar map Hierarchy Faces Curves Vertices Subcurves Halfedges Edges Traits

  17. Hierarchy Implementation In_place_list_node Base node next ptr prev ptr curve() set_curve() Subcurve node parent() children_begin() children_end() edges_begin() edges_end() begin/end ptr parent ptr Curve_node Edge_node level_begin(i) level_end(i) number_of_sc_levels() halfedge()

  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. Conditions on Curves Control polygon P2 P1 C P3 P0 Carrier Polygon

  22. Subdivision of a Convex Curve T(P2) T(P0) P1 P11 P01 T(P) P P2 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 1 2 1 2 3 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 Boundary polygon Intersection polygon

  31. Implementation Intersection graph Hierarchy tree Curve level original curve Subcurve level nodes edges Edge level halfedges vertices faces Planar map Traits class

  32. Adaptive Point Location Experiments

  33. Trade-off between Different Initializations

  34. Canonical Parabolas

  35. Comparison of 10 Canonical Parabolas

  36. Comparison of 20 Canonical Parabolas

  37. Another Application- Boolean Operations

  38. Boolean Operations Finding the intersection of N polygons: Label each face in the arrangement of the polygons with a covering number. 0 -1 1 -1 2 -1 1

  39. Demo 3: Boolean operations

  40. 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); }

  41. 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); } }

  42. 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/

More Related