ACS. Python, Scilab and Ipe interfaces to CGAL. Sébastien Loriot Naceur Meskini Sylvain Pion. ACS Technical Report No.

Size: px
Start display at page:

Download "ACS. Python, Scilab and Ipe interfaces to CGAL. Sébastien Loriot Naceur Meskini Sylvain Pion. ACS Technical Report No."

Transcription

1 ACS Algorithms for Complex Shapes with Certified Numerics and Topology Python, Scilab and Ipe interfaces to CGAL Sébastien Loriot Naceur Meskini Sylvain Pion ACS Technical Report No.: ACS-TR Part of deliverable: WP-III/D6 Site: INRIA Month: 36 Project co-funded by the European Commission within FP6 ( ) under contract nr. IST

2 Abstract We present three available software that we have developed as alternative user interfaces to the geometric algorithms and data structures available in CGAL. CGAL is a C++ library and makes use of refined C++ features in order to achieve efficiency and adaptability through genericity. In order to broaden the scope of usability of CGAL, especially targeting the non-c++ expert community, we have therefore started an effort to wrap CGAL in the following three languages and platforms. Python is a general purpose, interpreted, modern and easy to learn language, increasingly used for scientific computation. Scilab is a Matlab-like platform and language for numerical computations, which incorporates an interpreter. Finally, Ipe is an extensible drawing editor heavily used in the computational geometry community, which can call external plugins providing user-defined geometric algorithms for illustration purposes. This paper describes in more detail these three projects. 1

3 1 Introduction CGAL is a wonderful and powerful C++ library of geometric data structures and algorithms. Its key features are genericity, efficiency and robustness. It is a 12 years old project of considerable size: 600,000 lines of C++ code. It is used in numerous application domains in need for geometric computing, such as geographical information systems, geology, structural biology, medical imaging, CAD/CAM... CGAL is available under Open Source and commercial licenses. The mission statement of the CGAL project is to turn research results obtained in the field of computation geometry, into a software library usable in industry and academia. While CGAL is impressive, it is also sometimes hard to use for beginners due to the difficulty to have both simplicity and adaptability/genericity. In particular, CGAL makes use of advanced C++ features such as templates, which are hard to master by beginners in programming. We have therefore made some efforts to bring some important functionalities of CGAL to other communities, in order to reach more people. We have considered two other languages Python and Scilab, and a graphical drawing editor Ipe, and we have made some CGAL functionalities available through them. Scilab is an Open Source equivalent of Matlab, which is used by many engineers as well as in education. Python is an interpreted language which is dynamically typed and easy to learn, and it is increasingly used for scientific computations. Finally Ipe is an extensible graphical drawing editor focused on 2D with good support for geometry. We will present the three projects CGAL-PYTHON, CGLAB and CGAL- IPELETS, which respectively wrap parts of CGAL in Python, Scilab and Ipe, in the following 3 sections. For each of them we describe the design and implementation, give examples, and list the available functionalities. 2 CGAL-PYTHON: the Python interface to CGAL 2.1 Python presentation Quoting Python s web site, Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code. Python is increasingly used for scientific computing. For example, the SciPy project is a quickly growing collection of scientific tools in Python. We therefore decided to start an effort in order to have parts of CGAL available in Python. 2.2 Implementation and example Python provides facilities to interoperate with C and C++, that is, calling functions from external libraries, passing objects and data around. These libraries can then be loaded from the interpreter at run time in the form of shared libraries. On top of this, and specific to C++, is the Boost.Python library 2

4 doc/libs/1_35_0/libs/python/doc/index.html which provides a convenient way to add C++ types and functions to be made available in Python. On top of this, some tools have been developed to automate the process of listing the functions and types to wrap in Python, in combination with Boost.Python. Such tools are code parsers and generators like Py++ net/pyplusplus/pyplusplus.html that can understand CGAL s functions and classes declarations and generate an input suitable for Boot.Python. At the time we started the project, Py++ was not usable enough, so we chose another tool named Pyste. We decided to start from the output of Pyste, and then improve it by hand. Boost.Python in particular provides a mechanism to add documentation for the online help within the Python interpreter, which is something we used. One difficulty is the fact that template parameters have to be fixed, since we cannot trigger template instantiation from within Python (not easily at least). Some decisions can be differed at run-time, or several instantiations are sometimes possible with a run-time choice on the Python side, but we had to make some decisions also to simplify the interface in the Python side. Typically, iterators in C++ correspond to iterators in Python, but adaptation has to be done. In CGAL, one main choice which had to be made is the choice of a kernel and the number type used in the coordinates. This choice is critical since CGAL algorithms may have different requirements. We aimed here at simplicity and opted for a kernel using coordinates as floating-point, but using exact predicates for robustness and efficiency. Here is an example using the Triangulations 2 module: #Importation of Kernel module is necessary in order to be able to use #the basic geometric objects from CGAL.Kernel import * # we want to use a Delaunay_triangulation_2 from CGAL.Triangulations_2 import * from random import * # we construct the triangulation here dt = Delaunay_triangulation_2() # we generate a random points and insert them in the dt triangulation vertices = {} for i in range(20): vertices[i] = dt.insert(point_2(random(),random())) # cir_faces is a circulator over the incident faces of the Vertex vertices[0] cir_faces = dt.incident_faces(vertices[0]) # use of the incident_faces function # compute the finite faces incident to vertices[0] finite_faces = [] f1 = cir_faces.next() if dt.is_infinite(f1) == False: finite_faces.append(f1) for f in cir_faces: if f == f1: break finite_faces.append(f) 3

5 # the finite edges of the triangulation for e in dt.edges: print e.vertex() #draw_edge(e) # the finite vertices for v in dt.vertices: print v.point().x(),v.point().y() #the finite points: for p in dt.points: print p.x(),p.y() # use of line_walk function # first, we have to define a line that will cross the triangulation p1 = Point_2(0,0) p2 = Point_2(1,1) faces = dt.line_walk(p1,p2) # this function return a list of faces for f in faces: if dt.is_infinite(f) == False: #draw_face(f) print "this face is finite" 2.3 Available functionalities CGAL-PYTHON is available at Here is the list of functionalities available in CGAL-PYTHON, as of version Triangulations 2 This module corresponds to the Triangulation 2 package of CGAL that allows to build and handle various triangulations for point sets in two dimensions. It contains the following classes: Triangulation 2, Delaunay triangulation 2, Delaunay constrained triangulation 2, Constrained triangulation 2, Constrained triangulation plus 2. Triangulations 3 This module allows to build and handle triangulations for point sets in three dimensions. Currently this module provides two classes: Triangulation 3, Delaunay triangulation 3. Alpha shapes 2 Alpha shape 2. Alpha shapes 3 Alpha shape 3. Polyhedron Polyhedron 3. Convex hull 2 convex hull 2, ch akl toussaint, ch graham andrew. Geometric Optimisation Min ellipse 2, Min circle 2, Min sphere 3, Min annulus 2, Min annulus 3. 4

6 Mesh 2 Delaunay mesher 2. Kernel Point 2(3), Ray 2(3), and many other basic geometric objects. The project has several users, and even contributors, since more CGAL modules can be interfaced in CGAL-PYTHON, and extensions like the py.cgal.visual project 3 CGLAB: the Scilab interface to CGAL 3.1 SCILAB presentation Quoting Scilab s web site Scilab is a scientific software package for numerical computations providing a powerful open computing environment for engineering and scientific applications. Scilab is an open source software. Scilab is an environment similar to the commercial platform Matlab by The MathWorks. Its main data type is a matrix of floating-point values. 3.2 Implementation and example Scilab is a special environment, in particular its language is not general purpose, but specialized with a strong emphasis on matrices. In order to make some CGAL algorithms available in Scilab, we decided it was better to try to keep Scilab s native data structures, rather than wrap CGAL s. For example, in CGLAB, a triangulation is encoded as an adjacency matrix, but it is possible to use CGAL s data structure for an easier access to dynamic modification. Compared to Python, the possibility to more or less automatically wrap C++ functionalities in Scilab does not exist, so the wrappers are far less extensive compare to CGAL-PYTHON. We focused on triangulations and meshes. Here is an example of code using Scilab and CGLAB to build and plot a 2D Delaunay triangulation: x = rand(1,100); y = rand(1,100); tri = cgal_delaunay_2(x,y); [nbtri,nb] = size(tri); tri = [tri tri(:,1)]; for k = 1:nbtri plot2d(x(tri(k,:)), y(tri(k,:)), style = 2); end 3.3 Available functionalities CGLAB is available at with an online documentation. As of CGLAB 1.0, the list of available functionalities is the following: 2D and 3D Delaunay triangulations : access to the connectivity, and point insertion and removal. nd Delaunay triangulations : access to the connectivity, and point insertion. 2D Constrained Delaunay Triangulation : access to the connectivity, and point and constraints insertion and removal. 5

7 2D Meshes : access to the connectivity, mesh refinement. 2D and 3D Convex hull of points. Function Interpolation of functions defined on sets of points in 2D and 3D. Streamlines placements in 2D vector fields. 4 CGAL-IPELETS: plugins for the Ipe drawing editor based on CGAL 4.1 IPE presentation The Ipe extensible drawing editor ( is a vector based graphic editor written in C++ and Lua 5.1. This is a free software under GNU GPL license 1 working on Unix, Windows and Mac OS X. In addition to the classical possibility to draw segments, splines, circles, polygons... some advanced features such as different alignments, intersection snapping are provided for more accurate drawing. Written by Otfried Cheong [1], it has a large user base inside the computational geometry community and more generally among computer scientists. It is the natural companion for a latex document as it can call a L A TEX compiler that allows TEX notations on drawings and to save them as a PDF or an EPS file. Moreover since the notions of layers and multi-pages are provided it can be used as a WYSIWYG tool for preparation of presentation. Another reason to use Ipe is the fact that it is an extensible editor. Indeed through the mechanism of ipelets, users can provide a small piece of code that will be used by the software for a special drawing action. This allows you for example to draw figures in the paper for your new algorithm (in 2D of course). Since an ipelet must be written in C++, it comes naturally to interface Ipe with CGAL. Taking advantage of the work done in CGAL, we can provide a bunch of 2D algorithms helpful for illustration of the CGAL documentation, talks or papers, but also to test some ideas using Ipe instead of an erroneous handmade drawing, without writing a line of code. 4.2 Implementation and example The basic idea of the implementation is to provide one ipelet per class of 2D algorithm. Almost all the 2D algorithms of the 3.3 release of CGAL have been interfaced with Ipe. The mechanism is simple: we provide a basic class CGAL::Ipelet base from which your ipelet must inherit, which avoid some annoying and repetitive declarations. Some basic functions are additionally provided for example to convert points from Ipe format to CGAL point type. Using the implemented tools, a Delaunay triangulation ipelet using CGAL is simply the following: #include <CGAL/Delaunay_triangulation_2.h> //CGAL include #include <CGAL_Ipelet_base.h> //CGAL-ipelet include namespace CGAL_triangulation{ typedef CGAL::Delaunay_triangulation_2<KernelCD> Delaunay; const std::string Slab[] = {"Delaunay"}; //label in the menu 1 As a special exception, you have permission to link Ipe with the CGAL library and distribute executables, as long as you follow the requirements of the GNU General Public License in regard to all of the software in the executable aside from CGAL 6

8 const std::string Hmsg[] = { "Draw a Delaunay triangulation of a set of points"}; //help msg class triangulationipelet : public CGAL::Ipelet_base{ public: triangulationipelet() :CGAL::Ipelet_base(2,Slab,Hmsg,"Triangulations"){} void Unsafe_Run(int, IpePage *page, IpeletHelper *helper); }; void triangulationipelet ::Unsafe_Run(int fn, IpePage *page,ipelethelper *helper){ Delaunay dt; } if (fn==1) { Show_help(helper); return; } //Recover all points and insert them in the triangulation for(ipepage::iterator it=page->begin(); it!=page->end(); ++it) if(is_active_ipe_point(it)) dt.insert(ipe_to_cgal_point(it)); //check triangulation is not empty if (!dt.number_of_vertices()) { helper->message("no marks selected"); return; } page->deselectall(); //use implemented function to draw segments draw_segments(dt.finite_edges_begin(), dt.finite_edges_end(),dt,page,helper); //make the triangulation a group page->group(helper->currentlayer()); } //declaration of the ipelet using a macro CGAL_IPELET(CGAL_triangulation::triangulationIpelet) 4.3 Available functionalities In this section we enumerate the ipelets written available in release 0.9. More information can be found on the CGAL-IPELETS web site ( gforge.inria.fr/). Alpha-shape Draw the boundary of the alpha-shape and its faces for the k-th critical spectral value. Arrangement Given a set of circles, segments, polygons and circles arcs, compute the segmentation induced by intersection points and points of discontinuity for x-monotonicity. 7

9 Given a set of general segments, such that each endpoint is shared exactly twice, change this union to a closed path i.e. fillable. Given several closed paths, join them useful to fill a face with several holes. Diagrams Draw power using circles and points, Voronoi using points, segments, and Apollonius using circles and points, diagrams. Hilbert Curve Given a set of points, draw a Hilbert curve sorting these points. Hulls package Draw the minimal convex hull of a set of segments, circles and points. Draw the result of the crust algorithm for a set of points. K-th Delaunay Draw k-th Voronoi diagram or Delaunay triangulation of a set of points. K-th regular Draw the k-th Power diagram or Regular triangulation of a set of weighted points. Mesh 2 Mesh a close domain using algorithm Mesh 2: seeds are specified by circles. Minkowski Sum Draw the Minkowski sum of two simple polygons. Origin is placed at the min point of the bounding box of the selected objects. Draw the offsets of a simple polygon defined by a set of circles. Polygon partition Draw the convex partition of a polygon, several algorithms are available. Random Generators Generate random set of points, circles, segments. Triangulation Draw regular triangulation using circles and points Draw constrained triangulation using points and segments Draw Delaunay, conforming Delaunay and conforming Gabriel triangulations 5 Conclusion and future work We have presented three software projects CGAL-PYTHON, CGLAB and CGAL- IPELETS that deal with interfacing the CGAL library together with Python, Scilab and Ipe. The first two are programming environments which provide interpreters that allow to call CGAL functions directly. Ipe is a extensible drawing editor which can display the result of geometric algorithms available in CGAL. Future work could consist in extending the functionalities already made available in these wrappers, and possibly work on automating the process of wrapping, especially for CGAL-PYTHON. References [1] Otfried Schwarzkopf. The extendible drawing editor Ipe. In Proc. 11th Annu. ACM Sympos. Comput. Geom., pages C10 C11,

10 Figure 1: Using CGAL-IPELETS: ACS from a point cloud to polygons using Crust algorithm, to a mesh using Mesh 2 Figure 2: Using CGAL-IPELETS: Delaunay triangulation of a set of points 9

11 Figure 3: Using CGAL-IPELETS: Partition of a polygon in convex regions Figure 4: Using CGAL-IPELETS: Power diagram of a set of circles 10

Outline. CGAL par l exemplel. Current Partners. The CGAL Project.

Outline. CGAL par l exemplel. Current Partners. The CGAL Project. CGAL par l exemplel Computational Geometry Algorithms Library Raphaëlle Chaine Journées Informatique et GéomG ométrie 1 er Juin 2006 - LIRIS Lyon Outline Overview Strengths Design Structure Kernel Convex

More information

The Computational Geometry Algorithms Library. Andreas Fabri GeometryFactory

The Computational Geometry Algorithms Library. Andreas Fabri GeometryFactory The Computational Geometry Algorithms Library Andreas Fabri GeometryFactory Mission Statement Make the large body of geometric algorithms developed in the field of computational geometry available for

More information

Tools, Generic Programming, CGAL, and 2D Arrangement of CGAL

Tools, Generic Programming, CGAL, and 2D Arrangement of CGAL Tools, Generic Programming, CGAL, and 2D Arrangement of CGAL Efi Fogel efif@post.tau.ac.il School of computer science, Tel Aviv University Spring 2004 Motion Planning workshop 1/23 Tools, Toolkits, and

More information

Problèmes de robustesse en géométrie algorithmique

Problèmes de robustesse en géométrie algorithmique Problèmes de robustesse en géométrie algorithmique Monique Teillaud ENS - 12 mars 2008 Computational geometry Solving geometric problems algorithms complexity analysis worst case, average, randomized implementation

More information

The Arithmetic Toolbox in

The Arithmetic Toolbox in The Arithmetic Toolbox in Computational Geometry Algorithms Library Sylvain Pion Mini-workshop on irram/mpc/mpfr Schloß Dagstuhl April 18-20, 2018 Talk outline Brief overview of CGAL Robustness issues

More information

Computational Geometry

Computational Geometry Computational Geometry 600.658 Convexity A set S is convex if for any two points p, q S the line segment pq S. S p S q Not convex Convex? Convexity A set S is convex if it is the intersection of (possibly

More information

Project 1: Convex hulls and line segment intersection

Project 1: Convex hulls and line segment intersection MCS 481 / David Dumas / Spring 2014 Project 1: Convex hulls and line segment intersection Due at 10am on Monday, February 10 0. Prerequisites For this project it is expected that you already have CGAL

More information

Geometric Computation: Introduction

Geometric Computation: Introduction : Introduction Piotr Indyk Welcome to 6.838! Overview and goals Course Information Syllabus 2D Convex hull Signup sheet Geometric computation occurs everywhere: Geographic Information Systems (GIS): nearest

More information

Computational Geometry

Computational Geometry Lecture 1: Introduction and convex hulls Geometry: points, lines,... Geometric objects Geometric relations Combinatorial complexity Computational geometry Plane (two-dimensional), R 2 Space (three-dimensional),

More information

Möbius Transformations in Scientific Computing. David Eppstein

Möbius Transformations in Scientific Computing. David Eppstein Möbius Transformations in Scientific Computing David Eppstein Univ. of California, Irvine School of Information and Computer Science (including joint work with Marshall Bern from WADS 01 and SODA 03) Outline

More information

Voronoi diagram and Delaunay triangulation

Voronoi diagram and Delaunay triangulation Voronoi diagram and Delaunay triangulation Ioannis Emiris & Vissarion Fisikopoulos Dept. of Informatics & Telecommunications, University of Athens Computational Geometry, spring 2015 Outline 1 Voronoi

More information

APPLIED aspects of COMPUTATIONAL GEOMETRY. Dan Halperin School of Computer Science Tel Aviv University

APPLIED aspects of COMPUTATIONAL GEOMETRY. Dan Halperin School of Computer Science Tel Aviv University APPLIED aspects of COMPUTATIONAL GEOMETRY Introduction Dan Halperin School of Computer Science Tel Aviv University Lesson overview Background The main topics Course mechanics Additional topics 2 Background

More information

Introduction to the Computational Geometry Algorithms Library CGAL

Introduction to the Computational Geometry Algorithms Library CGAL Introduction to the Computational Geometry Algorithms Library CGAL www.cgal.org Monique Teillaud Part I The CGAL Open Source Project Goals Promote the research in Computational Geometry (CG) make the large

More information

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2013 3D Object Representations Raw data Point cloud Range image Polygon soup Surfaces Mesh Subdivision Parametric Implicit Solids Voxels

More information

Delaunay Triangulations. Presented by Glenn Eguchi Computational Geometry October 11, 2001

Delaunay Triangulations. Presented by Glenn Eguchi Computational Geometry October 11, 2001 Delaunay Triangulations Presented by Glenn Eguchi 6.838 Computational Geometry October 11, 2001 Motivation: Terrains Set of data points A R 2 Height ƒ(p) defined at each point p in A How can we most naturally

More information

Computational Geometry Algorithms Library. Pierre Alliez INRIA

Computational Geometry Algorithms Library. Pierre Alliez INRIA Computational Geometry Algorithms Library Pierre Alliez INRIA Mission Statement Make the large body of geometric algorithms developed in the field of computational geometry available for industrial applications

More information

Computational Geometry Algorithms Library. Geographic information Systems

Computational Geometry Algorithms Library. Geographic information Systems Computational Geometry Algorithms Library in Geographic information Systems Edward Verbree, Peter van Oosterom and Wilko Quak TU Delft, Department of Geodesy, Thijsseweg 11, 2629 JA Delft, the Netherlands

More information

Implementing Geometric Algorithms. Wouter van Toll June 20, 2017

Implementing Geometric Algorithms. Wouter van Toll June 20, 2017 Implementing Geometric Algorithms Wouter van Toll June 20, 2017 Introduction 6/20/2017 Lecture: Implementing Geometric Algorithms 2 Focus of this course Create algorithms to solve geometric problems Prove

More information

Computational Geometry. Algorithm Design (10) Computational Geometry. Convex Hull. Areas in Computational Geometry

Computational Geometry. Algorithm Design (10) Computational Geometry. Convex Hull. Areas in Computational Geometry Computational Geometry Algorithm Design (10) Computational Geometry Graduate School of Engineering Takashi Chikayama Algorithms formulated as geometry problems Broad application areas Computer Graphics,

More information

Triangle meshes I. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2017

Triangle meshes I. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2017 Triangle meshes I CS 4620 Lecture 2 2017 Steve Marschner 1 spheres Andrzej Barabasz approximate sphere Rineau & Yvinec CGAL manual 2017 Steve Marschner 2 finite element analysis PATRIOT Engineering 2017

More information

CS-235 Computational Geometry

CS-235 Computational Geometry CS-235 Computational Geometry Computer Science Department Fall Quarter 2002. Computational Geometry Study of algorithms for geometric problems. Deals with discrete shapes: points, lines, polyhedra, polygonal

More information

3D Modeling Parametric Curves & Surfaces

3D Modeling Parametric Curves & Surfaces 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2012 3D Object Representations Raw data Point cloud Range image Polygon soup Solids Voxels BSP tree CSG Sweep Surfaces Mesh Subdivision

More information

A Constrained Delaunay Triangle Mesh Method for Three-Dimensional Unstructured Boundary Point Cloud

A Constrained Delaunay Triangle Mesh Method for Three-Dimensional Unstructured Boundary Point Cloud International Journal of Computer Systems (ISSN: 2394-1065), Volume 03 Issue 02, February, 2016 Available at http://www.ijcsonline.com/ A Constrained Delaunay Triangle Mesh Method for Three-Dimensional

More information

Approximating Polygonal Objects by Deformable Smooth Surfaces

Approximating Polygonal Objects by Deformable Smooth Surfaces Approximating Polygonal Objects by Deformable Smooth Surfaces Ho-lun Cheng and Tony Tan School of Computing, National University of Singapore hcheng,tantony@comp.nus.edu.sg Abstract. We propose a method

More information

Triangle meshes I. CS 4620 Lecture 2

Triangle meshes I. CS 4620 Lecture 2 Triangle meshes I CS 4620 Lecture 2 2014 Steve Marschner 1 spheres Andrzej Barabasz approximate sphere Rineau & Yvinec CGAL manual 2014 Steve Marschner 2 finite element analysis PATRIOT Engineering 2014

More information

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality Planar Graphs In the first half of this book, we consider mostly planar graphs and their geometric representations, mostly in the plane. We start with a survey of basic results on planar graphs. This chapter

More information

Project 1: Convex hulls and line segment intersection

Project 1: Convex hulls and line segment intersection MCS 481 / David Dumas / Spring 2012 Project 1: Convex hulls and line segment intersection Due at 2pm on Monday, February 6 0. Requirements In order to complete this project you will need CGAL and a compatible

More information

Other Voronoi/Delaunay Structures

Other Voronoi/Delaunay Structures Other Voronoi/Delaunay Structures Overview Alpha hulls (a subset of Delaunay graph) Extension of Voronoi Diagrams Convex Hull What is it good for? The bounding region of a point set Not so good for describing

More information

Surface Mesh Generation

Surface Mesh Generation Surface Mesh Generation J.-F. Remacle Université catholique de Louvain September 22, 2011 0 3D Model For the description of the mesh generation process, let us consider the CAD model of a propeller presented

More information

Triangle meshes I. CS 4620 Lecture Kavita Bala (with previous instructor Marschner) Cornell CS4620 Fall 2015 Lecture 2

Triangle meshes I. CS 4620 Lecture Kavita Bala (with previous instructor Marschner) Cornell CS4620 Fall 2015 Lecture 2 Triangle meshes I CS 4620 Lecture 2 1 Shape http://fc00.deviantart.net/fs70/f/2014/220/5/3/audi_r8_render_by_smiska333-d7u9pjt.jpg spheres Andrzej Barabasz approximate sphere Rineau & Yvinec CGAL manual

More information

: Mesh Processing. Chapter 8

: Mesh Processing. Chapter 8 600.657: Mesh Processing Chapter 8 Handling Mesh Degeneracies [Botsch et al., Polygon Mesh Processing] Class of Approaches Geometric: Preserve the mesh where it s good. Volumetric: Can guarantee no self-intersection.

More information

Some Open Problems in Graph Theory and Computational Geometry

Some Open Problems in Graph Theory and Computational Geometry Some Open Problems in Graph Theory and Computational Geometry David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science ICS 269, January 25, 2002 Two Models of Algorithms Research

More information

Minkowski Sums. Dinesh Manocha Gokul Varadhan. UNC Chapel Hill. NUS CS 5247 David Hsu

Minkowski Sums. Dinesh Manocha Gokul Varadhan. UNC Chapel Hill. NUS CS 5247 David Hsu Minkowski Sums Dinesh Manocha Gokul Varadhan UNC Chapel Hill NUS CS 5247 David Hsu Last Lecture Configuration space workspace configuration space 2 Problem Configuration Space of a Translating Robot Input:

More information

Package RTriangle. January 31, 2018

Package RTriangle. January 31, 2018 Package RTriangle January 31, 2018 Copyright 1993, 1995, 1997, 1998, 2002, 2005 Jonathan Richard Shewchuk; 2011-2018 License CC BY-NC-SA 4.0 Title Triangle - A 2D Quality Mesh Generator and Delaunay Triangulator

More information

COMPUTING CONSTRAINED DELAUNAY

COMPUTING CONSTRAINED DELAUNAY COMPUTING CONSTRAINED DELAUNAY TRIANGULATIONS IN THE PLANE By Samuel Peterson, University of Minnesota Undergraduate The Goal The Problem The Algorithms The Implementation Applications Acknowledgments

More information

Smallest Intersecting Circle for a Set of Polygons

Smallest Intersecting Circle for a Set of Polygons Smallest Intersecting Circle for a Set of Polygons Peter Otfried Joachim Christian Marc Esther René Michiel Antoine Alexander 31st August 2005 1 Introduction Motivated by automated label placement of groups

More information

Lecture 2 Unstructured Mesh Generation

Lecture 2 Unstructured Mesh Generation Lecture 2 Unstructured Mesh Generation MIT 16.930 Advanced Topics in Numerical Methods for Partial Differential Equations Per-Olof Persson (persson@mit.edu) February 13, 2006 1 Mesh Generation Given a

More information

VORONOI DIAGRAM PETR FELKEL. FEL CTU PRAGUE Based on [Berg] and [Mount]

VORONOI DIAGRAM PETR FELKEL. FEL CTU PRAGUE   Based on [Berg] and [Mount] VORONOI DIAGRAM PETR FELKEL FEL CTU PRAGUE felkel@fel.cvut.cz https://cw.felk.cvut.cz/doku.php/courses/a4m39vg/start Based on [Berg] and [Mount] Version from 9.11.2017 Talk overview Definition and examples

More information

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9. II.4 Surface Simplification 37 II.4 Surface Simplification In applications it is often necessary to simplify the data or its representation. One reason is measurement noise, which we would like to eliminate,

More information

Outline of the presentation

Outline of the presentation Surface Reconstruction Petra Surynková Charles University in Prague Faculty of Mathematics and Physics petra.surynkova@mff.cuni.cz Outline of the presentation My work up to now Surfaces of Building Practice

More information

CS 532: 3D Computer Vision 14 th Set of Notes

CS 532: 3D Computer Vision 14 th Set of Notes 1 CS 532: 3D Computer Vision 14 th Set of Notes Instructor: Philippos Mordohai Webpage: www.cs.stevens.edu/~mordohai E-mail: Philippos.Mordohai@stevens.edu Office: Lieb 215 Lecture Outline Triangulating

More information

Topological Data Analysis - I. Afra Zomorodian Department of Computer Science Dartmouth College

Topological Data Analysis - I. Afra Zomorodian Department of Computer Science Dartmouth College Topological Data Analysis - I Afra Zomorodian Department of Computer Science Dartmouth College September 3, 2007 1 Acquisition Vision: Images (2D) GIS: Terrains (3D) Graphics: Surfaces (3D) Medicine: MRI

More information

Point to Ellipse Distance: A Binary Search Approach

Point to Ellipse Distance: A Binary Search Approach Point to Ellipse Distance: A Binary Search Approach Zhikai Wang http://www.heteroclinic.net Montreal, Quebec, Canada e-mail: wangzhikai@yahoo.com url: Abstract: We give an algorithm to compute the shortest

More information

Meshing in STAR-CCM+: Recent Advances Aly Khawaja

Meshing in STAR-CCM+: Recent Advances Aly Khawaja Meshing in STAR-CCM+: Recent Advances Aly Khawaja Outline STAR-CCM+: a complete simulation workflow Emphasis on pre-processing technology Recent advances in surface preparation and meshing Continue to

More information

CSE 5311 Notes 13: Computational Geometry

CSE 5311 Notes 13: Computational Geometry CSE 5311 Notes 13: Computational Geometry (Last updated 4/17/17 4:39 PM) SMALLEST ENCLOSING DISK See section 4.7 of de Berg ( http://dx.doi.org.ezproxy.uta.edu/10.1007/978-3-540-77974-2 ) Algorithm MINIDISC(P)

More information

UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels. Spring, Project

UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels. Spring, Project UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Project Project Deliverables Deliverable Due Date Grade % Proposal & Lead Class Discussion

More information

CPSC 695. Methods for interpolation and analysis of continuing surfaces in GIS Dr. M. Gavrilova

CPSC 695. Methods for interpolation and analysis of continuing surfaces in GIS Dr. M. Gavrilova CPSC 695 Methods for interpolation and analysis of continuing surfaces in GIS Dr. M. Gavrilova Overview Data sampling for continuous surfaces Interpolation methods Global interpolation Local interpolation

More information

Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language

Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language Introduction C++ widely-used general-purpose programming language procedural and object-oriented support strong support created by Bjarne Stroustrup starting in 1979 based on C Introduction to C++ also

More information

References. Additional lecture notes for 2/18/02.

References. Additional lecture notes for 2/18/02. References Additional lecture notes for 2/18/02. I-COLLIDE: Interactive and Exact Collision Detection for Large-Scale Environments, by Cohen, Lin, Manocha & Ponamgi, Proc. of ACM Symposium on Interactive

More information

CAD & Computational Geometry Course plan

CAD & Computational Geometry Course plan Course plan Introduction Segment-Segment intersections Polygon Triangulation Intro to Voronoï Diagrams & Geometric Search Sweeping algorithm for Voronoï Diagrams 1 Voronoi Diagrams Voronoi Diagrams or

More information

Chapter 8. Voronoi Diagrams. 8.1 Post Oce Problem

Chapter 8. Voronoi Diagrams. 8.1 Post Oce Problem Chapter 8 Voronoi Diagrams 8.1 Post Oce Problem Suppose there are n post oces p 1,... p n in a city. Someone who is located at a position q within the city would like to know which post oce is closest

More information

ENCODING AND DECODING OF PLANAR MAPS THROUGH CONFORMING DELAUNAY TRIANGULATIONS

ENCODING AND DECODING OF PLANAR MAPS THROUGH CONFORMING DELAUNAY TRIANGULATIONS ENCODING AND DECODING OF PLANAR MAPS THROUGH CONFORMING DELAUNAY TRIANGULATIONS Edward Verbree Delft University of Technology, Research Institute OTB, Section GIS technology, Jaffalaan 9, 2628 BX, Delft,

More information

Introduction to C++ with content from

Introduction to C++ with content from Introduction to C++ with content from www.cplusplus.com 2 Introduction C++ widely-used general-purpose programming language procedural and object-oriented support strong support created by Bjarne Stroustrup

More information

COMPUTATIONAL GEOMETRY

COMPUTATIONAL GEOMETRY Thursday, September 20, 2007 (Ming C. Lin) Review on Computational Geometry & Collision Detection for Convex Polytopes COMPUTATIONAL GEOMETRY (Refer to O'Rourke's and Dutch textbook ) 1. Extreme Points

More information

be a polytope. has such a representation iff it contains the origin in its interior. For a generic, sort the inequalities so that

be a polytope. has such a representation iff it contains the origin in its interior. For a generic, sort the inequalities so that ( Shelling (Bruggesser-Mani 1971) and Ranking Let be a polytope. has such a representation iff it contains the origin in its interior. For a generic, sort the inequalities so that. a ranking of vertices

More information

Voronoi Diagram. Xiao-Ming Fu

Voronoi Diagram. Xiao-Ming Fu Voronoi Diagram Xiao-Ming Fu Outlines Introduction Post Office Problem Voronoi Diagram Duality: Delaunay triangulation Centroidal Voronoi tessellations (CVT) Definition Applications Algorithms Outlines

More information

Python for Earth Scientists

Python for Earth Scientists Python for Earth Scientists Andrew Walker andrew.walker@bris.ac.uk Python is: A dynamic, interpreted programming language. Python is: A dynamic, interpreted programming language. Data Source code Object

More information

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016 Computergrafik Matthias Zwicker Universität Bern Herbst 2016 Today Curves NURBS Surfaces Parametric surfaces Bilinear patch Bicubic Bézier patch Advanced surface modeling 2 Piecewise Bézier curves Each

More information

2D Spline Curves. CS 4620 Lecture 18

2D Spline Curves. CS 4620 Lecture 18 2D Spline Curves CS 4620 Lecture 18 2014 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes that is, without discontinuities So far we can make things with corners (lines,

More information

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple Curves and surfaces Escaping Flatland Until now we have worked with flat entities such as lines and flat polygons Fit well with graphics hardware Mathematically simple But the world is not composed of

More information

Delaunay Triangulations

Delaunay Triangulations Delaunay Triangulations (slides mostly by Glenn Eguchi) Motivation: Terrains Set of data points A R 2 Height ƒ(p) defined at each point p in A How can we most naturally approximate height of points not

More information

Spectral Surface Reconstruction from Noisy Point Clouds

Spectral Surface Reconstruction from Noisy Point Clouds Spectral Surface Reconstruction from Noisy Point Clouds 1. Briefly summarize the paper s contributions. Does it address a new problem? Does it present a new approach? Does it show new types of results?

More information

Computational Geometry. Definition, Application Areas, and Course Overview

Computational Geometry. Definition, Application Areas, and Course Overview Computational Geometry Definition, Application Areas, and Course Overview Computational Geometry is a subfield of the Design and Analysis of Algorithms Computational Geometry is a subfield of the Design

More information

Triangle meshes. Computer Graphics CSE 167 Lecture 8

Triangle meshes. Computer Graphics CSE 167 Lecture 8 Triangle meshes Computer Graphics CSE 167 Lecture 8 Examples Spheres Andrzej Barabasz Approximate sphere Rineau & Yvinec CGAL manual Based on slides courtesy of Steve Marschner 2 Examples Finite element

More information

Lecture 1: September 6, 2001

Lecture 1: September 6, 2001 Lecture 1: September 6, 2001 Welcome to 6.838J, Geometric Computation! Introductions Overview and Goals General Information Syllabus 2D Convex Hull Signup sheets (return by end of class) MIT 6.838J/4.214J

More information

Molecular Shapes and Surfaces *

Molecular Shapes and Surfaces * OpenStax-CNX module: m11616 1 Molecular Shapes and Surfaces * Lydia E. Kavraki This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 1.0 Topics in this Module

More information

Geometric Algorithms in Three Dimensions Tutorial. FSP Seminar, Strobl,

Geometric Algorithms in Three Dimensions Tutorial. FSP Seminar, Strobl, Geometric Algorithms in Three Dimensions Tutorial FSP Seminar, Strobl, 22.06.2006 Why Algorithms in Three and Higher Dimensions Which algorithms (convex hulls, triangulations etc.) can be generalized to

More information

Solving problems with Cgal: an example using the 2D Apollonius package

Solving problems with Cgal: an example using the 2D Apollonius package GTS 2012, Chapel Hill, NC, United States, June 17 & 19, 2012 Solving problems with Cgal: an example using the 2D Apollonius package Menelaos I. Karavelas, 1 Introduction The Cgal project [3] is an open

More information

(Master Course) Mohammad Farshi Department of Computer Science, Yazd University. Yazd Univ. Computational Geometry.

(Master Course) Mohammad Farshi Department of Computer Science, Yazd University. Yazd Univ. Computational Geometry. 1 / 17 (Master Course) Mohammad Farshi Department of Computer Science, Yazd University 1392-1 2 / 17 : Mark de Berg, Otfried Cheong, Marc van Kreveld, Mark Overmars, Algorithms and Applications, 3rd Edition,

More information

Triangulation and Convex Hull. 8th November 2018

Triangulation and Convex Hull. 8th November 2018 Triangulation and Convex Hull 8th November 2018 Agenda 1. Triangulation. No book, the slides are the curriculum 2. Finding the convex hull. Textbook, 8.6.2 2 Triangulation and terrain models Here we have

More information

G 6i try. On the Number of Minimal 1-Steiner Trees* Discrete Comput Geom 12:29-34 (1994)

G 6i try. On the Number of Minimal 1-Steiner Trees* Discrete Comput Geom 12:29-34 (1994) Discrete Comput Geom 12:29-34 (1994) G 6i try 9 1994 Springer-Verlag New York Inc. On the Number of Minimal 1-Steiner Trees* B. Aronov, 1 M. Bern, 2 and D. Eppstein 3 Computer Science Department, Polytechnic

More information

66 III Complexes. R p (r) }.

66 III Complexes. R p (r) }. 66 III Complexes III.4 Alpha Complexes In this section, we use a radius constraint to introduce a family of subcomplexes of the Delaunay complex. These complexes are similar to the Čech complexes but differ

More information

Surface reconstruction based on a dynamical system

Surface reconstruction based on a dynamical system EUROGRAPHICS 2002 / G. Drettakis and H.-P. Seidel (Guest Editors) Volume 21 (2002), Number 3 Surface reconstruction based on a dynamical system N.N. Abstract We present an efficient algorithm that computes

More information

CS368: Geometric Algorithms Handout # 6 Design and Analysis Stanford University Wednesday, 14 May 2003

CS368: Geometric Algorithms Handout # 6 Design and Analysis Stanford University Wednesday, 14 May 2003 CS368: Geometric Algorithms Handout # 6 Design and Analysis Stanford University Wednesday, 14 May 2003 The following is a set of notes prepared by the class TA, Daniel Russel, on addressing numerical issues

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling Welcome to the lectures on computer graphics. We have

More information

Computational Geometry Algorithmische Geometrie

Computational Geometry Algorithmische Geometrie Algorithmische Geometrie Panos Giannopoulos Wolfgang Mulzer Lena Schlipf AG TI SS 2013 !! Register in Campus Management!! Outline What you need to know (before taking this course) What is the course about?

More information

Lecture Tessellations, fractals, projection. Amit Zoran. Advanced Topics in Digital Design

Lecture Tessellations, fractals, projection. Amit Zoran. Advanced Topics in Digital Design Lecture Tessellations, fractals, projection Amit Zoran Advanced Topics in Digital Design 67682 The Rachel and Selim Benin School of Computer Science and Engineering The Hebrew University of Jerusalem,

More information

Simplicial Complexes: Second Lecture

Simplicial Complexes: Second Lecture Simplicial Complexes: Second Lecture 4 Nov, 2010 1 Overview Today we have two main goals: Prove that every continuous map between triangulable spaces can be approximated by a simplicial map. To do this,

More information

1/60. Geometric Algorithms. Lecture 1: Introduction. Convex Hulls

1/60. Geometric Algorithms. Lecture 1: Introduction. Convex Hulls 1/60 Geometric Algorithms Lecture 1: Introduction Convex Hulls Geometric algorithms scope 2/60 Geometry algorithms (practice): Study of geometric problems that arise in various applications and how algorithms

More information

(Refer Slide Time: 00:02:24 min)

(Refer Slide Time: 00:02:24 min) CAD / CAM Prof. Dr. P. V. Madhusudhan Rao Department of Mechanical Engineering Indian Institute of Technology, Delhi Lecture No. # 9 Parametric Surfaces II So these days, we are discussing the subject

More information

Matching and Planarity

Matching and Planarity Matching and Planarity Po-Shen Loh June 010 1 Warm-up 1. (Bondy 1.5.9.) There are n points in the plane such that every pair of points has distance 1. Show that there are at most n (unordered) pairs of

More information

Voronoi Diagrams and Delaunay Triangulations. O Rourke, Chapter 5

Voronoi Diagrams and Delaunay Triangulations. O Rourke, Chapter 5 Voronoi Diagrams and Delaunay Triangulations O Rourke, Chapter 5 Outline Preliminaries Properties and Applications Computing the Delaunay Triangulation Preliminaries Given a function f: R 2 R, the tangent

More information

Lecture notes: Object modeling

Lecture notes: Object modeling Lecture notes: Object modeling One of the classic problems in computer vision is to construct a model of an object from an image of the object. An object model has the following general principles: Compact

More information

Scientific Computing WS 2018/2019. Lecture 12. Jürgen Fuhrmann Lecture 12 Slide 1

Scientific Computing WS 2018/2019. Lecture 12. Jürgen Fuhrmann Lecture 12 Slide 1 Scientific Computing WS 2018/2019 Lecture 12 Jürgen Fuhrmann juergen.fuhrmann@wias-berlin.de Lecture 12 Slide 1 Recap For more discussion of mesh generation, see J.R. Shewchuk: Lecture Notes on Delaunay

More information

Surface Reconstruction. Gianpaolo Palma

Surface Reconstruction. Gianpaolo Palma Surface Reconstruction Gianpaolo Palma Surface reconstruction Input Point cloud With or without normals Examples: multi-view stereo, union of range scan vertices Range scans Each scan is a triangular mesh

More information

Algorithms for GIS csci3225

Algorithms for GIS csci3225 Algorithms for GIS csci3225 Laura Toma Bowdoin College Spatial data types and models Spatial data in GIS satellite imagery planar maps surfaces networks point cloud (LiDAR) Spatial data in GIS satellite

More information

CS368: Geometric Algorithms Handout # 2 Design and Analysis Stanford University Monday, 17 April 2006

CS368: Geometric Algorithms Handout # 2 Design and Analysis Stanford University Monday, 17 April 2006 CS368: Geometric Algorithms Handout # 2 Design and Analysis Stanford University Monday, 17 April 2006 Homework #1: Arrangements, zones, straight and topological sweeps [70 points] Due Date: Monday, 1 May

More information

Design Intent of Geometric Models

Design Intent of Geometric Models School of Computer Science Cardiff University Design Intent of Geometric Models Frank C. Langbein GR/M78267 GR/S69085/01 NUF-NAL 00638/G Auckland University 15th September 2004; Version 1.1 Design Intent

More information

Polygons and Convexity

Polygons and Convexity Geometry Week 4 Sec 2.5 to ch. 2 test Polygons and Convexity section 2.5 convex set has the property that any two of its points determine a segment contained in the set concave set a set that is not convex

More information

Hang Si. Weierstrass Institute for Applied Analysis and Stochastics Berlin, Germany. Tetrahedron II

Hang Si. Weierstrass Institute for Applied Analysis and Stochastics Berlin, Germany. Tetrahedron II W eierstraß-institut für Angew andte Analysis und Stochastik 3D Boundary Recovery and Constrained Delaunay Tetrahedralizations Hang Si Weierstrass Institute for Applied Analysis and Stochastics Berlin,

More information

May 7: The source code for your project, including instructions for compilation and running, are due today. This portion is worth 80% of your score:

May 7: The source code for your project, including instructions for compilation and running, are due today. This portion is worth 80% of your score: CS 294-74 Mesh Generation and Geometry Processing in Graphics, Engineering, and Modeling Second Project: Mesh Generator, Surface Reconstructor, or Mesh Processing Program 40% of final grade Implement a

More information

The Cantor Handbook. Alexander Rieder

The Cantor Handbook. Alexander Rieder Alexander Rieder 2 Contents 1 Introduction 5 2 Using Cantor 6 2.1 Cantor features....................................... 6 2.2 The Cantor backends.................................... 7 2.3 The Cantor Workspace...................................

More information

The ITAPS Mesh Interface

The ITAPS Mesh Interface The ITAPS Mesh Interface Carl Ollivier-Gooch Advanced Numerical Simulation Laboratory, University of British Columbia Needs and Challenges for Unstructured Mesh Usage Application PDE Discretization Mesh

More information

Lecture 3: Art Gallery Problems and Polygon Triangulation

Lecture 3: Art Gallery Problems and Polygon Triangulation EECS 396/496: Computational Geometry Fall 2017 Lecture 3: Art Gallery Problems and Polygon Triangulation Lecturer: Huck Bennett In this lecture, we study the problem of guarding an art gallery (specified

More information

What is visualization? Why is it important?

What is visualization? Why is it important? What is visualization? Why is it important? What does visualization do? What is the difference between scientific data and information data Cycle of Visualization Storage De noising/filtering Down sampling

More information

Linear Complexity Hexahedral Mesh Generation

Linear Complexity Hexahedral Mesh Generation Linear Complexity Hexahedral Mesh Generation David Eppstein Department of Information and Computer Science University of California, Irvine, CA 92717 http://www.ics.uci.edu/ eppstein/ Tech. Report 95-51

More information

Euler s Theorem. Brett Chenoweth. February 26, 2013

Euler s Theorem. Brett Chenoweth. February 26, 2013 Euler s Theorem Brett Chenoweth February 26, 2013 1 Introduction This summer I have spent six weeks of my holidays working on a research project funded by the AMSI. The title of my project was Euler s

More information

Introduction to Geometry. Computer Graphics CMU /15-662

Introduction to Geometry. Computer Graphics CMU /15-662 Introduction to Geometry Computer Graphics CMU 15-462/15-662 Assignment 2: 3D Modeling You will be able to create your own models (This mesh was created in Scotty3D in about 5 minutes... you can do much

More information

Weighted and Continuous Clustering

Weighted and Continuous Clustering John (ARC/ICAM) Virginia Tech... Math/CS 4414: http://people.sc.fsu.edu/ jburkardt/presentations/ clustering weighted.pdf... ARC: Advanced Research Computing ICAM: Interdisciplinary Center for Applied

More information

Voronoi Diagrams and Delaunay Triangulation slides by Andy Mirzaian (a subset of the original slides are used here)

Voronoi Diagrams and Delaunay Triangulation slides by Andy Mirzaian (a subset of the original slides are used here) Voronoi Diagrams and Delaunay Triangulation slides by Andy Mirzaian (a subset of the original slides are used here) Voronoi Diagram & Delaunay Triangualtion Algorithms Divide-&-Conquer Plane Sweep Lifting

More information