FC 46
FC 46
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”
Image
Processing
CAD/CAM
VLSI
Digital maps
Medical
Scientific
visualization
GIS
Geophysics
(Oil&Gas)
Telecom
CGAL Open Source Project
Project = « Planned Undertaking »
Predicates Constructions
orientation(p,q,r)
<0 >0
=0
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
Lazy number = interval and arithmetic Lazy object = approximated object and
expression tree geometric operation tree
b
s1
l
(3.2 + 1.5) * 13 i
m p
a
s2
3.2 1.5
s1 s2 b l
CGAL manual
Merits and Limitations
• Ultimate robustness inside the black box
insert(Key k)
{
if (less(k, treenode.key))
insertLeft(k);
else
insertRight(k);
}
};
STL manual
CGAL Genericity
template < class Geometry >
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){...}
}
};
CGAL Genericity Demo
Without explicit conversion to points in the plane
• Triangulate the terrain in an xy-plane
• Triangulate the faces of a Polyhedron