Computational Geometry Algorithms Library Andreas Fabri GeometryFactory Pierre Alliez INRIA Efi Fogel Tel Aviv University.

Slides:



Advertisements
Similar presentations
Raid dr. Patrick De Causmaecker What is RAID Redundant Array of Independent (Inexpensive) Disks A set of disk stations treated as one.
Advertisements

Polygon overlay in double precision arithmetic One example of why robust geometric code is hard to write Jack Snoeyink & Andrea Mantler Computer Science,
1 DiSTiL : A Transformation Library for Data Structures Yannis Smaragdakis.
Computational Geometry Definition and Application Areas.
DEpthLAUNAY1 DEpthLAUNAY Manuel Abellanas Alfredo de las Vegas Facultad de Informática - UPM.
1st Meeting Industrial Geometry Computational Geometry ---- Some Basic Structures 1st IG-Meeting.
DESIGN OF A GENERIC PATH PATH PLANNING SYSTEM AILAB Path Planning Workgroup.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Computational Geometry and Spatial Data Mining
1 Last lecture  Configuration Space Free-Space and C-Space Obstacles Minkowski Sums.
1cs542g-term Notes. 2 Meshing goals  Robust: doesn’t fail on reasonable geometry  Efficient: as few triangles as possible Easy to refine later.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
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.
Exploring Computational Mathematics: Unfolding Polyhedra Brittany Terese Fasy, Duke University David Millman, UNC-Chapel Hill MathFest 2008.
An Algorithm for Polytope Decomposition and Exact Computation of Multiple Integrals.
TU/e computational geometry introduction Mark de Berg.
1 An Exact, Complete and Efficient Computation of Arrangements of Bézier Curves Iddo Hanniel – Technion, Haifa Ron Wein – Tel-Aviv University.
Area 1: Algorithms Dan Halperin, School of Computer Science, Tel Aviv University.
Generic Object Detection using Feature Maps Oscar Danielsson Stefan Carlsson
Chapter 2: Algorithm Discovery and Design
Computational Geometry Algorithms Library Source: CGAL web page
Mark Waitser Computational Geometry Seminar December Iterated Snap Rounding.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling.
Algebraic numbers I Based on Burnikel, Fleischer, Mehlhorn, Schirra article: A Strong and Easily Computable Separation Bound for Arithmetic Expressions.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Minkowski Sums and Offset Polygons Ron Wein. Computing Minkowski Sums.
Carnegie Mellon Adaptive Mapping of Linear DSP Algorithms to Fixed-Point Arithmetic Lawrence J. Chang Inpyo Hong Yevgen Voronenko Markus Püschel Department.
Voronoi diagrams of “nice” point sets Nina Amenta UC Davis “The World a Jigsaw”
1 Street Generation for City Modeling Xavier Décoret, François Sillion iMAGIS GRAVIR/IMAG - INRIA.
Applications of CGAL in the Gel Analysis Software CAROL Klaus Kriegel Freie Universität Berlin Deutsches Herzzentrum Berlin DFG Projekt FL 165/4-2.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to.
Lecture 3: Details of Projects Software Workshop: High-Quality Motion Paths for Robots (and Other Creatures) Barak Raveh, School of CS, Tel-Aviv University.
System/Software Testing
How to win in ACM/ICPC? Four levels of programmers 1. Implementation ◦ know the language well, translate idea to programs 2. Algorithms ◦
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Exploiting Domain-Specific High-level Runtime Support for Parallel Code Generation Xiaogang Li Ruoming Jin Gagan Agrawal Department of Computer and Information.
ADA: 14. Intro to CG1 Objective o give a non-technical overview of Computational geometry, concentrating on its main application areas Algorithm.
Dobrina Boltcheva, Mariette Yvinec, Jean-Daniel Boissonnat INRIA – Sophia Antipolis, France 1. Initialization Use the.
The Open Source Project Andreas Fabri GeometryFactory Lutz Kettner Max Planck Institute.
Automatic Generation of Staged Geometric Predicates Aleksandar Nanevski, Guy Blelloch and Robert Harper PSCICO project
SURFACE RECONSTRUCTION FROM POINT CLOUD Bo Gao Master’s Thesis December, 2007 Thesis Committee: Professor Harriet Fell Professor Robert Futrelle College.
Point Set Processing and Surface Reconstruction (
3D Triangulations in Pierre Alliez.
Nick Draper 05/11/2008 Mantid Manipulation and Analysis Toolkit for ISIS data.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
Boost.Geometry Introduction to Boost.Geometry presented by Mateusz Loskot (Cadcorp Ltd.) at FOSS4G 2010.
Pierre Alliez The Computational Geometry Algorithm Library.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Spectral surface reconstruction Reporter: Lincong Fang 24th Sep, 2008.
QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs By Koen Claessen, Juhn Hughes ME: Mike Izbicki.
Vehicle Segmentation and Tracking From a Low-Angle Off-Axis Camera Neeraj K. Kanhere Committee members Dr. Stanley Birchfield Dr. Robert Schalkoff Dr.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Shewchuck 2D Triangular Meshing.
VTK-m Project Goals A single place for the visualization community to collaborate, contribute, and leverage massively threaded algorithms. Reduce the challenges.
Approximate Inference: Decomposition Methods with Applications to Computer Vision Kyomin Jung ( KAIST ) Joint work with Pushmeet Kohli (Microsoft Research)
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Administration Feedback on assignment Late Policy
Templates & STL Stefan Roiser, Lorenzo Moneta CERN PH/SFT.
Arrangements Efi Fogel Tel Aviv University. Outline Arrangements Algorithms based on Arrangements Boolean Set Operations Minkowski Sums and Polygon Offset.
Copyright © 2009 – Curt Hill Standard Template Library An Introduction.
Shape Reconstruction from Samples with Cocone Tamal K. Dey Dept. of CIS Ohio State University.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
The Computational Geometry Algorithm Library Andreas Fabri INRIA Sophia-Antipolis CGAL.
1 Point Location Strategies Idit Haran
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Topics  Direct Predicate Characterization as an evaluation method.  Implementation and Testing of the Approach.  Conclusions and Future Work.
Localizing the Delaunay Triangulation and its Parallel Implementation
Advanced Computer Architecture 5MD00 Project on Network-on-Chip
CUTE: A Concolic Unit Testing Engine for C
Presentation transcript:

Computational Geometry Algorithms Library Andreas Fabri GeometryFactory Pierre Alliez INRIA Efi Fogel Tel Aviv University

Course Outline Overview Andreas30’ Polyhedron Pierre40’ Arrangements Efi40’ Break15’ 2D Triangulations & Meshes Andreas 40’ 3D Triangulations & Meshes Pierre 40’ Wrap-up, Q&A15’

Overview Andreas Fabri GeometryFactory

Mission Statement “Make the large body of geometric algorithms developed in the field of computational geometry available for industrial applications” CGAL Project Proposal, 1996

Algorithms and Datastructures Bounding VolumesPolyhedral SurfaceBooleanOperations Triangulations Subdivision Simplification Voronoi Diagrams Parametrisation Mesh Generation Streamlines Ridge Detection Minkowski Sum Kinetic Datastructures PCAQP SoverLower EnvelopeArrangement Intersection Detection Polytope distance Neighbor Search

CGAL in Numbers 500,000 lines of C++ code 10,000 downloads/year (+ Linux distributions)‏ 3,500 manual pages 3,000 subscribers to cgal-announce 1,000 subscribers to cgal-discuss 120 packages 60 commercial users 20 active developers 12 months release cycle 2 licenses: Open Source and commercial

Some Commercial Users Geophysics (Oil&Gas) ‏ CAD/CAM Image Processing Telecom Medical GIS Digital maps Scientific visualization VLSI

“ I recommended to the senior management that we start a policy of buying-in as much functionality as possible to reduce the quantity of code that our development team would have to maintain. This means that we can concentrate on the application layer and concentrate on our own problem domain.” Why They Use CGAL Senior Development Engineer & Structural Geologist Midland Valley Exploration

“ My research group JYAMITI at the Ohio State University uses CGAL because it provides an efficient and robust code for Delaunay triangulations and other primitive geometric predicates. Delaunay triangulation is the building block for many of the shape related computations that we do. [...] Without the robust and efficient codes of CGAL, these codes could not have been developed. ” Why They Use CGAL Tamal Dey Professor, Ohio State University

CGAL Open Source Project

Project = « Planned Undertaking » Institutional members make a long term commitment: Inria, MPI, Tel-Aviv U, Utrecht U, Groningen U, ETHZ, GeometryFactory, FU Berlin, Forth, U Athens Editorial Board –Steers and animates the project –Reviews submissions Development Infrastructure –Gforge: svn, tracker, nightly testsuite,... –120p developer manual and mailing list –Two 1-week developer meetings per year

Contributions Submission of specifications of new contributions Review and decision by the Editorial Board Value for contributor –Integration in the CGAL community –Gain visibility in a mature project –Publication value for accepted contributions

Exact Geometric Computing

Predicates and Constructions Predicates Constructions orientation in_circle intersection circumcenter

Robustness Issues Naive use of floating-point arithmetic causes geometric algorithms to: –Produce [slightly] wrong output –Crash after invariant violation –Infinite loop There is a gap between – Geometry in theory – Geometry with floating-point arithmetic

Geometry in Theory ccw(s,q,r) & ccw(p,s,r) & ccw(p,q,s)  ccw(p,q,r) Correctness proofs of algorithms rely on such theorems

The Trouble with Double orientation(p,q,r) = sign((p x -r x )(q y -r y )-(p y -r y )(q x -r x ))‏ negative zero positive

Exact Geometric Computing [Yap] Make sure that the control flow in the implementation corresponds to the control flow with exact real arithmetic <0 >0 =0 orientation(p,q,r)‏

Filtered Predicates Generic functor adaptor Filtered_predicate<> –Try the predicate instantiated with intervals –In case of uncertainty, evaluate the predicate with multiple precision arithmetic Refinements: –Static error analysis –Progressively increase precision

Filtered Constructions [] + * if (collinear(a',m',b'))‏ if ( n' < m' )‏ midpoin t intersect projection ([], [])‏ b s1 s2l m' i'p' p a s1 s2 l m i b n' Lazy number = interval and arithmetic expression tree Lazy object = approximated object and geometric operation tree Test that may trigger an exact re-evaluation: ( ) * 13

The User Perspective Convenience Kernels – Exact_predicates_inexact_constructions_kernel – Exact_predicates_exact_constructions_kernel – Exact_predicates_exact_constructions_kernel_with_sqrt Number Types – double, float – CGAL::Gmpq (rational), Core (algebraic)‏ – CGAL::Lazy_exact_nt Kernels – CGAL::Cartesian – CGAL::Filtered_kernel – CGAL::Lazy_kernel CGAL manual CGAL manual

Merits and Limitations Ultimate robustness inside the black box The time penalty is reasonable, e.g. 10% for 3D Delauny triangulation of 1M random points Limitations of Exact Geometric Computing –Topology preserving rounding is non-trivial –Construction depth must be reasonable –Cannot handle trigonometric functions

Generic Programming

STL Genericity STL manual STL manual template class set { Less less; insert(Key k)‏ { if (less(k, treenode.key))‏ insertLeft(k); else insertRight(k); } };

CGAL Genericity template class Delaunay_triangulation_2 { Geometry::Orientation orientation; Geometry::In_circle in_circle; void insert(Geometry::Point t) {... if(in_circle(p,q,r,t)) {...}... if(orientation(p,q,r){...} } };

t emplate class Delaunay_triangulation_2 { }; t emplate class Triangulation_data_structure_2 { }; CGAL Genericity

Iterators template class Delaunay_triangulation_2 { typedef.. Vertex_iterator; typedef.. Face_iterator; Vertex_iterator vertices_begin(); Vertex_iterator vertices_end(); template incident_faces(Vertex_handle v, OutputIterator it); }; std::list faces; dt.incident_faces(v, std::back_inserter(faces));

Iterators list points; Delaunay_triangulation dt; dt.insert(points.begin(), points.end()); template class Delaunay_triangulation_2 { template void insert(T begin, T end);// typeof(*begin)==Point };

Boost Graph Library (BGL) Rich collection of graph algorithms: shortest paths, minimum spanning tree, flow, etc. Design that –decouples data structure from algorithm –links them through a thin glue layer BGL and CGAL –Provide glue layer for CGAL –Extension to embedded graphs inducing the notion of faces BGL manual BGL manual

BGL Glue Layer: Traits Class template struct boost::graph_traits { typedef... vertex_descriptor; typedef... edge_descriptor; typedef... vertex_iterator; typedef... out_edge_iterator; };

vertex_descriptor v, w; edge_descriptor e; v = source(e,G); w = target(e,G); std::pair ipair; ipair = out_edges(v,G); BGL Glue Layer: Free Functions G v e w

BGL Glue Layer for CGAL Users can run: Courtesy: P.Schroeder, Caltech CGAL manual CGAL manual boost::kruskal_mst(P); template graph_traits >; template Polyhedron ::Vertex source(Polyhedron ::Edge); CGAL provides partial specializations:

From A BGL Glue Layer for CGAL > Graph > Graph CGAL::HDS BGL::Algorithm boost::adjacency_list

To BGL Style CGAL Algorithms > Graph > Graph > EmbeddedGraph > EmbeddedGraph User::Polyhedron CGAL::HDS BGL::Algorithm CGAL::Algorithm boost::adjacency_list

Summary: Overview Huge collection with uniform APIs Modular and not monolithic Open Source and commercial licenses Clear focus on geometry Interfaces with de facto standards/leaders: STL, Boost, GMP, Qt, blas Robust and fast through exact geometric computing Easy to integrate through generic programming