diff --git a/.gitattributes b/.gitattributes index df0f59648a5..a53a52473a7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5635,6 +5635,41 @@ Surface_mesh_parameterization/test/Surface_mesh_parameterization/data/pyramid.of Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cmd eol=lf Surface_mesh_parameterization/test/Surface_mesh_parameterization/quick_test_suite.bat eol=crlf Surface_mesh_parameterization/test/Surface_mesh_parameterization/quick_test_suite.sh eol=lf +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Classified.txt -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableMesh.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeProfile.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt -text +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.jpg -text svneol=unset#image/jpeg +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/detail.png -text svneol=unset#image/png +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.pdf -text svneol=unset#application/pdf +Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.png -text svneol=unset#image/png Surface_mesh_simplification/doc_tex/OLD[!!-~]Surface_mesh_simplification.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.jpg -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.pdf -text svneol=unset#application/pdf diff --git a/Documentation/doxyassist.xml b/Documentation/doxyassist.xml index 27a9cacce7c..cbcd734ed5d 100644 --- a/Documentation/doxyassist.xml +++ b/Documentation/doxyassist.xml @@ -252,6 +252,20 @@ namespace for the XML file to be processed properly. --> + + Triangulated Surface Mesh Simplification + ../Surface_mesh_simplification/doc + + ../Surface_mesh_simplification/doc/Surface_mesh_simplification/ + ../Surface_mesh_simplification/doc/Surface_mesh_simplification/ + ./tags/Surface_mesh_simplification.tag + ../Surface_mesh_simplification/examples + ../Surface_mesh_simplification/doc/Surface_mesh_simplification/fig + + + + + 3D Convex Hulls ../Convex_hull_3/doc @@ -975,6 +989,7 @@ namespace for the XML file to be processed properly. --> ../Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/fig ../Straight_skeleton_2/doc/Straight_skeleton_2/fig ../Voronoi_diagram_2/doc/Voronoi_diagram_2/fig + ../Surface_mesh_simplification/doc/Surface_mesh_simplification/fig ./tags/Algebraic_foundations.tag=../../CGAL.CGAL.Algebraic-Foundations/html @@ -1033,6 +1048,7 @@ namespace for the XML file to be processed properly. --> ./tags/Segment_Delaunay_graph_2.tag=../../CGAL.CGAL.2D-Segment-Delaunay-Graphs/html ./tags/Straight_skeleton_2.tag=../../CGAL.CGAL.2D-Straight-Skeleton-and-Polygon-Offsetting/html ./tags/Voronoi_diagram_2.tag=../../CGAL.CGAL.2D-Voronoi-Diagram-Adaptor/html + ./tags/Surface_mesh_simplification.tag=../../CGAL.CGAL.Triangulated-Surface-Mesh-Simplification/html cgal_stylesheet.css true diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h new file mode 100644 index 00000000000..055a08ef6d8 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h @@ -0,0 +1,27 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Edge_collapse_visitor_base` provides a base class for models of the `EdgeCollapseSimplificationVisitor` concept. +It has one template argument: the type of surface being simplified, +which must be a model of the `EdgeCollapsableMesh` concept. + +This base class implements all of the visitor's callbacks. +This way, users need only override the callbacks they are interested in. +The callbacks are not virtual because this is not a dynamically polymorphic base class +and the derived visitor will never be used polymorphically at runtime (is perfectly fine to override +and hide a non-virtual method in the context of the static polymorphism used in the simplification algorithm). + +\models ::EdgeCollapseSimplificationVisitor + +*/ +template< typename ECM > +class Surface_mesh_simplification::Edge_collapse_visitor_base { +public: + +/// @} + +}; /* end Surface_mesh_simplification::Edge_collapse_visitor_base */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h new file mode 100644 index 00000000000..b6a00d664a4 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -0,0 +1,48 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Count_ratio_stop_predicate` provides a model for the `StopPredicate` concept. +It has one template argument: the type of surface being simplified, +which must be a model of the `EdgeCollapsableMesh` concept. +It returns `true` when the relation between the initial and current number +of edges drops below a certain ratio. + +\models ::StopPredicate + +\sa `CGAL::Surface_mesh_simplification::Count_stop_predicate` + +*/ +template< typename ECM > +class Surface_mesh_simplification::Count_ratio_stop_predicate { +public: + +/// \name Creation +/// @{ + +/*! +Initializes the predicate establishing the `ratio`. +*/ +Count_ratio_stop_predicate( double ratio ); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns \f$ ( ((double)current\_count / (double)initial\_count) < ratio)\f$. +All other parameters are ignored (but exist since this is a generic policy). +*/ +bool operator()( FT const& current_cost +, Profile const& edge_profile +, size_type initial_count +, size_type current_count +) const ; + +/// @} + +}; /* end Surface_mesh_simplification::Count_ratio_stop_predicate */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h new file mode 100644 index 00000000000..5781aebd9a7 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -0,0 +1,46 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Count_stop_predicate` provides a model for the `StopPredicate` concept. +It has one template argument: the type of surface being simplified, +which must be a model of the `EdgeCollapsableMesh` concept. +It returns `true` when the number of current edges drops below a certain threshold. + +\models ::StopPredicate + +\sa `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` + +*/ +template< typename ECM > +class Surface_mesh_simplification::Count_stop_predicate { +public: + +/// \name Creation +/// @{ + +/*! +Initializes the predicate establishing the `threshold` value. +*/ +Count_stop_predicate( size_type threshold ); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns \f$ (current\_count < threshold)\f$. All other parameters are ignored (but exist since this is a generic policy). +*/ +bool operator()( FT const& current_cost +, Profile const& edge_profile +, size_type initial_count +, size_type current_count +) const ; + +/// @} + +}; /* end Surface_mesh_simplification::Count_stop_predicate */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h new file mode 100644 index 00000000000..ebf80b915f7 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h @@ -0,0 +1,45 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Edge_length_cost` provides a model for the `GetCost` concept. +It has one template argument: the type of surface being simplified, +which must be a model of the `EdgeCollapsableMesh` concept. +It computes the collapse cost as the squared length of the edge. + +\models ::GetCost + +*/ +template< typename ECM > +class Surface_mesh_simplification::Edge_length_cost { +public: + +/// \name Creation +/// @{ + +/*! +Default constructor +*/ +Edge_length_cost(); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns the collapse cost as the squared distance between the points +of the source and target vertices (that is, `profile.p0()` and `profile.p1()`. + +The `placement` argument is ignored. + +*/ +result_type operator()( Profile const& profile +, boost::optional const& placement ) const; + +/// @} + +}; /* end Surface_mesh_simplification::Edge_length_cost */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h new file mode 100644 index 00000000000..d8157ef03f4 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h @@ -0,0 +1,24 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Edge_profile` provides a model for the `EdgeProfile` concept. +It has one template argument: the type of surface being simplified, +which must be a model of the `EdgeCollapsableMesh` concept. + +\models ::EdgeProfile + +\sa `GetCost` +\sa `GetPlacement` + +*/ +template< typename ECM > +class Surface_mesh_simplification::Edge_profile { +public: + +/// @} + +}; /* end Surface_mesh_simplification::Edge_profile */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h new file mode 100644 index 00000000000..adaa719bbce --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h @@ -0,0 +1,47 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::LindstromTurk_cost` provides a model for the `GetCost` concept. +It computes the collapse cost following the Lindstrom-Turk strategy +(Section \ref SurfaceMeshSimplificationLindstromTurkStrategy) + +The class `Surface_mesh_simplification::LindstromTurk_cost` has one template argument: the type of surface being simplified. +It must be a model of the `EdgeCollapsableMesh` concept. + +\models ::GetCost + +\sa `CGAL::Surface_mesh_simplification::LindstromTurk_placement` + +*/ +template< typename ECM > +class Surface_mesh_simplification::LindstromTurk_cost { +public: + +/// \name Creation +/// @{ + +/*! +Initializes the policy with the given weighting unit factor. +See \ref SurfaceMeshSimplificationLindstromTurkStrategy for details on the meaning of this factor. +*/ +LindstromTurk_cost( FT const& factor = FT(0.5) ); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns the cost of collapsing the edge (represented by its profile) considering +the new `placement` computed for it. +*/ +result_type operator()( Profile const& profile +, boost::optional const& placement ) const; + +/// @} + +}; /* end Surface_mesh_simplification::LindstromTurk_cost */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h new file mode 100644 index 00000000000..4369c161818 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h @@ -0,0 +1,47 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::LindstromTurk_placement` provides a model for the `GetPlacement` concept. +It computes the placement, that is, the new position for the remaining vertex after +a halfedge-collapse, following the Lindstrom-Turk strategy +(Section \ref SurfaceMeshSimplificationLindstromTurkStrategy). + +The class `Surface_mesh_simplification::LindstromTurk_placement` has one template argument: the type of surface being simplified. +It must be a model of the `EdgeCollapsableMesh` concept. + +\models ::GetPlacement + +\sa `CGAL::Surface_mesh_simplification::LindstromTurk_cost` + +*/ +template< typename ECM > +class Surface_mesh_simplification::LindstromTurk_placement { +public: + +/// \name Creation +/// @{ + +/*! +Initializes the policy with the given weighting unit factor. +See \ref SurfaceMeshSimplificationLindstromTurkStrategy for details on the meaning of this factor. +*/ +LindstromTurk_placement( FT const& factor = FT(0.5) ); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns the new position for the remaining vertex after collapsing the edge +(represented by its profile). +*/ +result_type operator()( Profile const& edge_profile ) const; + +/// @} + +}; /* end Surface_mesh_simplification::LindstromTurk_placement */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h new file mode 100644 index 00000000000..f2ba9acf4cd --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h @@ -0,0 +1,43 @@ + +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +The class `Surface_mesh_simplification::Midpoint_placement` provides a model for the `GetPlacement` concept. +It computes the placement as the midpoint position along the edge. + +The class `Surface_mesh_simplification::Midpoint_placement` has one template arguments: the type of surface being simplified. +It be a model of the `EdgeCollapsableMesh` concept. + +\models ::GetPlacement + +*/ +template< typename ECM > +class Surface_mesh_simplification::Midpoint_placement { +public: + +/// \name Creation +/// @{ + +/*! +Default constructor +*/ +Midpoint_placement(); + +/// @} + +/// \name Operations +/// @{ + +/*! +Returns the placement (vertex position) as the midpoint between +the points of the source and target vertices +(`profile.p0()` and `profile.p1()`) +*/ +result_type operator()( Profile const& edge_profile ) const; + +/// @} + +}; /* end Surface_mesh_simplification::Midpoint_placement */ +} /* end namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h new file mode 100644 index 00000000000..9ce955d7849 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h @@ -0,0 +1,161 @@ +namespace CGAL { + +/*! +\ingroup PkgSurfaceMeshSimplification + +Simplifies `surface` in-place by collapsing edges, and returns +the number of edges effectively removed. + +The function `Surface_mesh_simplification::edge_collapse` simplifies in-place a triangulated surface mesh by iteratively collapsing edges. + +Non-named parameters +-------------- + +`surface` is the surface to simplify. +It must be a model of the `EdgeCollapsableMesh` concept. + +`should_stop` is the stop-condition policy. +It must be a model of the `StopPredicate` concept. + +Named parameters +-------------- + +`named_parameters` holds the list of all the additional parameters +used by the `edge_collapse` function (including default parameters). + +The named parameters list is a composition of function calls separated by a dot (\f$ .\f$) where +the name of each function matches the name of an argument and wraps the actual parameter. + +This is an example with 2 arguments: + +`vertex_index_map(the_actual_vertex_index_map).edge_index_map(the_actual_edge_index_map)` + +`the_actual_vertex_index_map` and `the_actual_edge_index_map` are +the actual parameters, while `vertex_index_map()` and `edge_index_map()` +are wrapper functions used to designate each formal argument. + +All named parameters have default values so you only need to compose those for which the default +is inappropriate. Furthermore, since each actual parameter is wrapped in a function whose name +designates the formal argument, the order of named parameters in the list is totally irrelevant. + +In the following subsections, each named parameter is documented as a helper function. The argument to each helper +function is the actual parameter to `edge_collapse()`, while the name of the helper +function designates which formal argument it is. + +## vertex_index_map(VertexIndexMap vpm) ## + +Maps each vertex in the surface into an unsigned integer number +in the range `[0,num_vertices(surface))`. + +`VertexIndexMap` must be a +ReadablePropertyMap +whose `key_type` is +`boost::graph_traits::vertex_descriptor` +and whose `value_type` is +`boost::graph_traits::size_type`, + +Default: the property map obtained by calling `get(vertex_index,surface)`, +which requires the surface vertices to have an `id()` member properly initialized to the +required value. + +If the vertices don't have such an `id()`, you must pass some property map explicitly. +An external property map can be easily obtained by calling +`get(vertex_external_index,surface)`. This constructs on the fly, and returns, +a property map which non-intrusively associates a proper id with each vertex. + +## edge_index_map(EdgeIndexMap eim) ## + +Maps each directed edge in the surface into an unsigned integer number +in the range `[0,num_edges(surface))`. + +`EdgeIndexMap` must be a +ReadablePropertyMap +whose `key_type` is +`boost::graph_traits::edge_descriptor` +and whose `value_type` is +`boost::graph_traits::size_type` + +Default: the property map obtained by calling `get(edge_index,surface)`, +which requires the surface edges to have an `id()` member properly initialized to the +require value. + +If the edges don't have such an `id()`, you must pass some property map explicitly. +An external property map can be easily obtained by calling +`get(edge_external_index,surface)`. This constructs on the fly, and returns, +a property map which non-intrusively associates a proper id with each edge. + +## edge_is_border_map(EdgeIsBorderMap ebm) ## + +Maps each directed edge in the surface into a Boolean value +which indicates if the edge belongs to the boundary of the surface +(facing the outside). +`EdgeIsBorderMap` must be a +ReadablePropertyMap +whose `key_type` is +`boost::graph_traits::edge_descriptor` +and whose `value_type` is `bool`. + +Default: the property map obtained by calling `get(edge_is_border,surface)`. + +## get_cost(GetCost gc) ## + +The policy which returns the collapse cost for an edge. + +The type of `gc` must be a model of the `GetCost` concept. + +Default: +`CGAL::Surface_mesh_simplification::LindstromTurk_cost`. + +## get_placement(GetPlacement gp) ## + +The policy which returns the placement (position of the replacemet vertex) +for an edge. + +The type of `gp` must be a model of the `GetPlacement` concept. + +Default: +`CGAL::Surface_mesh_simplification::LindstromTurk_placement` + +## visitor(EdgeCollapseSimplificationVisitor v) ## + +The visitor that is called by the `edge_collapse` function +in certain points to allow the user to track the simplification process. + +The type of `v` must be a model of the `EdgeCollapseSimplificationVisitor` concept. + +Default: an implementation-defined dummy visitor. + +If you wish to provide your own visitor, you can derive from: +`CGAL::Surface_mesh_simplification::Edge_collapse_visitor_base` +and override only the callbacks you are interested in. + +All these functions naming parameters are defined in +`namespace CGAL`. Being non-member functions, they could clash +with equally named functions in some other namespace. If that happens, +simply qualify the first +\footnote{The second and subsequent named parameters shall not be qualified as they are member functions} +named parameter with `CGAL::`, as shown in the examples in the user manual. + +Semantics +-------------- + +The simplification process continues until the `should_stop` policy returns `true` +or the surface cannot be simplified any further due to topological constraints. + +`get_cost` and `get_placement` are the policies which control +the cost-strategy, that is, the order in which edges are collapsed +and the remaining vertex is re-positioned. + +`visitor` is used to keep track of the simplification process. It has several member functions which +are called at certain points in the simplification code. + +*/ + +template +int edge_collapse ( EdgeCollapsableMesh& surface +, StopPredicate const& should_stop +, sms_named_params const& named_parameters +) ; + +} /* namespace CGAL */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Classified.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Classified.txt new file mode 100644 index 00000000000..2325d00a9ce --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Classified.txt @@ -0,0 +1,191 @@ + +This chapter introduces the concepts and classes of the triangulated surface mesh simplification package. + +The packages provides a policy-based algorithm for the simplification of triangulated surface meshes +by iterative edge-collapsing. + +# Classified Reference Pages # + +HEADING:Concepts +-------------- + +`EdgeCollapsableMesh` + +`EdgeProfile` + +`StopPredicate` + +`GetCost` + +`GetPlacement` + +`EdgeCollapseSimplificationVisitor` + +HEADING:Functions +-------------- + +\ref ::CGAL::Surface_mesh_simplification::edge_collapse + +HEADING:Classes +-------------- + +\ref ::CGAL::Surface_mesh_simplification::Edge_collapse_visitor_base + +\ref ::CGAL::Surface_mesh_simplification::Edge_profile + +\ref ::CGAL::Surface_mesh_simplification::Count_stop_predicate + +\ref ::CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate + +\ref ::CGAL::Surface_mesh_simplification::Edge_length_cost + +\ref ::CGAL::Surface_mesh_simplification::Midpoint_placement + +\ref ::CGAL::Surface_mesh_simplification::LindstromTurk_cost + +\ref ::CGAL::Surface_mesh_simplification::LindstromTurk_placement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableMesh.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableMesh.h new file mode 100644 index 00000000000..303a4c37675 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableMesh.h @@ -0,0 +1,95 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `EdgeCollapsableMesh` describes the requirements for the type of +triangulated surface mesh that can be passed to the +simplification algorithm. + +The surface must be structurally equivalent to a polyhedral surface +having only triangular faces. +It can have any number of connected components, boundaries +(borders and holes) and handles (arbitrary genus). + +\refines ::HalfedgeGraph + +Valid Expressions +-------------- + +The mesh simplification algorithm requires the free function `collapse_triangulation_edge()`. + +Let `v0` be the source and `v1` be the target vertices of `v0v1`. + +For `e` \f$ \in \{\f$ `v0v1,v1v0` \f$ \}\f$, let `en` and `ep` be the next and previous +edges, that is `en = next_edge(e, mesh)`, `ep = prev_edge(e,mesh)`, and let +`eno` and `epo` be their opposite edges, that is +`eno = opposite_edge(en, mesh)` and `epo = opposite_edge(ep,mesh)`. + +Then, after the collapse of `(v0v1,v1v0)` the following holds: + +
    +
  • The edge `e` is no longer in `mesh`. +
  • One of \f$ \{\f$`v0,v1`\f$ \}\f$ is no longer in `mesh` while the other remains. +\footnote{Even though it would appear that v0 can always be the vertex being removed, there is a case when removing the edge `e` requires `v1` to be removed as well. See figure \ref CollapseFigure5.} +Let `vgone` be the removed vertex and `vkept` be the remaining vertex. +
  • If `e` was a border edge, that is `get(is_border, e, mesh) == true`, then `next_edge(ep) == en`, and `prev_edge(en) == ep`. +
  • If `e` was not a border edge, that is `get(is_border, e, mesh) == false`, then `ep` and `epo` are no longer in `mesh` while `en` and `eno` are kept in `mesh`. +
  • For all edges `ie` in `in_edges(vgone,mesh)`, `target(ie,mesh) == vkept` and `source(opposite_edge(ie),mesh) == vkept`. +
  • No other incidence information has changed in `mesh`. +
+ +The function returns vertex `vkept` (which can be either `v0` or `v1`). + +\image html general_collapse.png +
+General case. The following mesh elements are removed: triangles (\f$ v0,v1,vL\f$) and (\f$ v1,v0,vR\f$), edges \f$ (e,e')\f$, \f$ (ep,epo)\f$ and \f$ (ep',epo')\f$, and vertex \f$ v0\f$. +
+ +\image html border_collapse3.png "When the collapsing edge is not itself a border, but is incident upon a border edge that is removed, the operation is the same as in the general case." + +\image html border_collapse2.png +
+When the collapsing edge is not itself a border, but is incident upon +a border edge that is not removed, the operation is still the +same as in the general case. +
+ +\image html border_collapse1.png +
+When the collapsing edge is itself a border, only 1 triangle is +removed. Thus, even if \f$ (ep',epo')\f$ exists, it's not removed. +
+ +\anchor CollapseFigure5 +\image html border_collapse4.png +
+This figure illustrates the single exceptional case when removing \f$ +(v0,v1)\f$ neccesarily implies removing \f$ (v1)\f$, thus \f$ (v0)\f$ +remains. +
+ +\hasModel `CGAL::Polyhedron_3` (If it has only triangular faces, and via +External Adaptation, which is described in \cite cgal:sll-bgl-02 +and this Bgl web page: http://www.boost.org/libs/graph/doc/leda_conversion.html). + +\sa `boost::graph_traits< CGAL::Polyhedron_3 >` +\sa `CGAL::halfedge_graph_traits< CGAL::Polyhedron_3 >` + +*/ + +class EdgeCollapsableMesh { +public: +}; /* end EdgeCollapsableMesh */ + +/*! +Collapses the undirected edge `(v0v1,v1v0)` replacing it with `v0` or `v1`, +as described in the following paragraph. +\pre This function requires `mesh` to be an oriented 2-manifold with or without boundaries. Furthermore, the undirected edge `(v0v1,v1v0)` must satisfy the link condition \cite degn-tpec-98, which guarantees that the surface is also 2-manifold after the edge collapse. +\relates EdgeCollapsableMesh +*/ +template +typename boost::graph_traits::vertex_descriptor +halfedge_collapse(typename boost::graph_traits::edge_descriptor const& ue, EdgeCollapsableMesh& mesh); + + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h new file mode 100644 index 00000000000..91c03d781bf --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h @@ -0,0 +1,117 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `EdgeCollapseSimplificationVisitor` describes the requirements for the visitor object which is used to track the edge collapse simplification algorithm. + +The several callbacks given as member functions in the visitor are called from certain places in the algorithm implementation. + +*/ + +class EdgeCollapseSimplificationVisitor { +public: + +/// \name Types +/// @{ + +/*! +The type of the surface to simplify. Must be a model of the `EdgeCollapsableMesh` concept. +*/ +typedef Hidden_type ECM; + +/*! +A field type representing the collapse cost +*/ +typedef Hidden_type FT; + +/*! +The type of the edge profile cache. Must be a model of the `EdgeProfile` concept. +*/ +typedef Hidden_type Profile; + +/*! +The point type for the surface vertex. Must be a model of `Point_3`. +*/ +typename CGAL::halfedge_graph_traits::Point Point; + +/*! +An integer type representing the number of edges +*/ +typedef Hidden_type size_type; + +/// @} + +/// \name Operations +/// @{ + +/*! +Called before the algorithm starts. +*/ +void OnStarted( ECM& surface ); + +/*! +Called after the algorithm finishes. +*/ +void OnFinished ( ECM& surface ) ; + +/*! +Called when the `StopPredicate` returned `true` +(but not if the algorithm terminates because the surface could not be simplified any further). + +*/ +void OnStopConditionReached( ECM& surface ) ; + +/*! +Called during the collecting phase (when a cost is assigned to the edges), +for each edge collected. + +*/ +void OnCollected( Profile const& profile, boost::optional cost ); + +/*! +Called during the processing phase (when edges are collapsed), +for each edge that is selected. + +This method is called before the algorithm checks +if the edge is collapsable. + +`cost` indicates the current collapse cost for the edge. +If absent (meaning that it could not be computed) +the edge will not be collapsed. + +`initial_count` and `current_count` refer to +the number of edges. + +*/ +void OnSelected( Profile const& profile +, boost::optional cost +, size_type initial_count +, size_type current_count +); + +/*! +Called when an edge is about to be collapsed and replaced by a vertex +whose position is `*placement`. + +If `placement` is absent (meaning that it could not be computed) +the edge will not be collapsed. + +*/ +void OnCollapsing( Profile const& profile +, boost::optional placement +); + +/*! +Called for each selected edge which cannot be +collapsed because doing so would change the topological +type of the surface (turn it into a non-manifold +for instance). + +*/ +void OnNonCollapsable( Profile const& profile ); + +/// @} + +}; /* end EdgeCollapseSimplificationVisitor */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeProfile.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeProfile.h new file mode 100644 index 00000000000..4c6fe17f9ab --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeProfile.h @@ -0,0 +1,138 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `EdgeProfile` describes the requirements for a data structure that caches the local topology and geometry in the surroundings of an undirected edge. + +This profile is used by the stop, cost and placement policies. + +\hasModel `CGAL::Surface_mesh_simplification::Edge_profile` + +*/ + +class EdgeProfile { +public: + +/// \name Types +/// @{ + +/*! +The type of the surface to simplify. Must be a model of the `EdgeCollapsableMesh` concept. +*/ +typedef Hidden_type ECM; + +/*! +A Bgl vertex descriptor representing a vertex of the surface. +*/ +typename boost::graph_traits::vertex_descriptor vertex_descriptor; + +/*! +A Bgl edge descriptor representing an edge of the surface. +*/ +typename boost::graph_traits::edge_descriptor edge_descriptor; + +/*! +The point type for the surface vertex. Must be a model of `Point_3`. +*/ +typename CGAL::halfedge_graph_traits::Point Point; + +/// @} + +/// \name Access Functions +/// @{ + +/*! +One of vertices of the edge to be collapsed. +*/ +vertex_descriptor v0() const; + +/*! +The other vertex of the edge to be collapsed. +*/ +vertex_descriptor v1() const; + +/*! +One of the directed edges corresponding to the undirected +edge being collapsed. +*/ +edge_descriptor v0v1() const; + +/*! +The other directed edge corresponding to the undirected +edge being collapsed. +*/ +edge_descriptor v1v0() const; + +/*! +The point of vertex \f$ v0\f$. +*/ +Point const& p0() const; + +/*! +The point of vertex \f$ v1\f$. +*/ +Point const& p1() const; + +/*! +If \f$ v0v1\f$ belongs to a finite face (is not a border edge) +the third vertex of that triangular face, a null descriptor otherwise. +*/ +vertex_descriptor vL() const; + +/*! +If \f$ v0v1\f$ belongs to a finite face (is not a border edge) +the directed edge from \f$ v1\f$ to \f$ vL\f$, a null descriptor otherwise. +*/ +edge_descriptor v1vL() const; + +/*! +If \f$ v0v1\f$ belongs to a finite face (is not a border edge) +the directed edge from \f$ vL\f$ to \f$ v0\f$, a null descriptor otherwise. +*/ +edge_descriptor vLv0() const; + +/*! +If \f$ v1v0\f$ belongs to a finite face (is not a border edge) +the third vertex of that triangular face, a null descriptor otherwise. +*/ +vertex_descriptor vR() const; + +/*! +If \f$ v1v0\f$ belongs to a finite face (is not a border edge) +the directed edge from \f$ v0\f$ to \f$ vR\f$, a null descriptor otherwise. +*/ +edge_descriptor v0vR() const; + +/*! +If \f$ v1v0\f$ belongs to a finite face (is not a border edge) +the directed edge from \f$ vR\f$ to \f$ v1\f$, a null descriptor otherwise. +*/ +edge_descriptor vRv1() const; + +/*! +The unique sequence of the vertices +around \f$ v0v1\f$ in topological order (ccw or ccw depending +on the relative ordering of `v0` and `v1` in the profile). +*/ +std::vector link() const; + +/*! +The unique collection of the border directed edges incident upon \f$ v0\f$ and \f$ v1\f$. +*/ +std::vector border_edges() const; + +/*! +Indicates if `v0v1` belongs to a finite face of the mesh (i.e, `v0v1` is not a border edge). +*/ +bool left_face_exits() const; + +/*! +Indicates if `v0v1` belongs to a finite face of the mesh (i.e, `v1v0` is not a border edge). +*/ +bool right_face_exits() const; + +/// @} + +}; /* end EdgeProfile */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h new file mode 100644 index 00000000000..91ee04dcc3d --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h @@ -0,0 +1,64 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `GetCost` describes the requirements for the policy function object +which gets the collapse cost of an edge. + +The cost returned is a `boost::optional` value (i.e. it can be absent). +An absent cost indicates that the edge should not be collapsed. +This could be the result of a computational limitation (such as overflow), +or can be intentionally returned to prevent the edge from being collapsed. + +\refines ::DefaultConstructible +\refines ::CopyConstructible + +\hasModel `CGAL::Surface_mesh_simplification::Edge_length_cost` +\hasModel `CGAL::Surface_mesh_simplification::LindstromTurk_cost` + +*/ + +class GetCost { +public: + +/// \name Types +/// @{ + +/*! +The type of the edge profile cache. Must be a model of the `EdgeProfile` concept. +*/ +typedef Hidden_type Profile; + +/*! +A field type representing the collapse cost +*/ +typedef Hidden_type FT; + +/*! +The point type for the surface vertex. Must be a model of `Point_3`. +*/ +typename CGAL::halfedge_graph_traits::Point Point; + +/*! +The type of the result (an optional cost value). +*/ +boost::optional result_type; + +/// @} + +/// \name Operations +/// @{ + +/*! +Computes and returns the cost of collapsing the edge (represented by its profile), +using the calculated placement. + +*/ +result_type operator()( Profile const& edge_profile +, boost::optional const& placement ) const; + +/// @} + +}; /* end GetCost */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h new file mode 100644 index 00000000000..ba30ac90106 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h @@ -0,0 +1,58 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `GetPlacement` describes the requirements for the policy +function object which gets the collapse placement of an edge, +that is, the new position of the vertex that remains after a +halfedge-collapse operation. + +The placement returned is a `boost::optional` value (i.e., it can +be absent). An absent result indicates that the remaining vertex +must be kept in place, not moved to a new position. + +\refines ::DefaultConstructible +\refines ::CopyConstructible + +\hasModel `CGAL::Surface_mesh_simplification::Midpoint_placement` +\hasModel `CGAL::Surface_mesh_simplification::LindstromTurk_placement` + +*/ + +class GetPlacement { +public: + +/// \name Types +/// @{ + +/*! +The type of the edge profile cache. Must be a model of the `EdgeProfile` concept. +*/ +typedef Hidden_type Profile; + +/*! +The point type for the surface vertex. Must be a model of `Point_3`. +*/ +typename CGAL::halfedge_graph_traits::Point Point; + +/*! +The type of the result (an optional point). +*/ +boost::optional result_type; + +/// @} + +/// \name Operations +/// @{ + +/*! +Computes and returns the placement, that is, the position of the vertex +which replaces the collapsing edge (represented by its profile). +*/ +result_type operator()( Profile const& edge_profile ) const; + +/// @} + +}; /* end GetPlacement */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h new file mode 100644 index 00000000000..d34f09ed4aa --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h @@ -0,0 +1,66 @@ + +/*! +\ingroup PkgSurfaceMeshSimplificationConcepts +\cgalconcept + +The concept `StopPredicate` describes the requirements for the predicate which indicates if the simplification process must finish. + +\hasModel `CGAL::Surface_mesh_simplification::Count_stop_predicate` +\hasModel `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` + +*/ + +class StopPredicate { +public: + +/// \name Types +/// @{ + +/*! +The type of the surface to simplify. Must be a model of the `EdgeCollapsableMesh` concept. +*/ +typedef Hidden_type ECM; + +/*! +A field type representing the collapse cost +*/ +typedef Hidden_type FT; + +/*! +An integer type representing the number of edges +*/ +typedef Hidden_type size_type; + +/*! +The type of the edge profile cache. Must be a model of the `EdgeProfile` concept. +*/ +typedef Hidden_type Profile; + +/// @} + +/// \name Operations +/// @{ + +/*! + +This predicate is called each time an edge is selected for processing, +before it is collapsed. + +`current_cost` is the cost of the selected edge. + +`initial_count` and `current_count` are the number of initial and current edges. + +If the return value is `true` the simplification terminates before processing the edge, +otherwise it continues normally. + +*/ +bool operator()( FT const& current_cost +, Profile const& profile +, size_type initial_count +, size_type current_count +) const ; + +/// @} + +}; /* end StopPredicate */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt new file mode 100644 index 00000000000..25ca5225a1d --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt @@ -0,0 +1,18 @@ + + +/// \defgroup PkgSurfaceMeshSimplification Triangulated Surface Mesh Simplification +/// \defgroup PkgSurfaceMeshSimplificationConcepts Concepts +/// \ingroup PkgSurfaceMeshSimplification +/*! +\addtogroup PkgSurfaceMeshSimplification +\todo check generated documentation +\PkgDescriptionBegin{Triangulated Surface Mesh Simplification} +\PkgPicture{detail.png} +\PkgAuthor{Fernando Cacciola} +\PkgDesc{This package provides an algorithm to simplify a triangulated surface mesh by edge collapsing. It is an implementation of the Turk/Lindstrom memoryless mesh simplification algorithm.} +\PkgSince{3.3} +\cgalbib{cgal:c-tsms-12} +\license{\ref licensesGPL "GPL"} +\PkgDescriptionEnd +*/ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt new file mode 100644 index 00000000000..d99dc737e9e --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -0,0 +1,299 @@ + +\page chaptermeshsimplification Triangulated Surface Mesh Simplification + +namespace CGAL { +/*! + +\mainpage Triangulated Surface Mesh Simplification +\anchor chaptermeshsimplification + +\authors Fernando Cacciola + +\image html Illustration-Simplification-ALL.jpg + +# Introduction # + +Surface mesh simplification is the process of reducing the number of faces used in the surface while +keeping the overall shape, volume and boundaries preserved as much as possible. +It is the opposite of subdivision. + +The algorithm presented here can simplify any oriented 2-manifold surface, +with any number of connected components, with or without boundaries (border or holes) +and handles (arbitrary genus), using a method known as edge collapse. +Roughly speaking, the method consists of iteratively replacing an edge with a single vertex, +removing 2 triangles per collapse. + +Edges are collapsed according to a priority given by a user-supplied cost function, +and the coordinates of the replacing vertex are determined by another user-supplied +placement function. The algorithm terminates when a user-supplied stop predicate +is met, such as reaching the desired number of edges. + +The algorithm implemented here is generic in the sense that it does not require the surface +to be of a particular type. Instead, it defines the concept of a `EdgeCollapsableMesh`, +which presents the surface as being a halfedge data structure, and any surface that +is a model of that concept can be simplified. The concept is defined not in terms of a monolithic class, but in terms of a set +of functions and traits, making it easy to adapt any concrete surface type, +even if it is not a halfedge data structure at all. +In particular, the concept definition follows the design of the + Boost Graph Library (Bgl) +\cite cgal:sll-bgl-02. + +The design is policy-based +(http://en.wikipedia.org/wiki/Policy-based_design), +meaning that you can customize some aspects of the process by passing a set of +policy objects. Each policy object specifies a particular aspect of the algorithm, +such as how edges are selected and where the replacement vertex is placed. All policies have +a sensible default. +Furthermore, the API uses the so-called `named-parameters` technique which allows you +to pass only the relevant parameters, in any order, omitting those parameters whose +default is appropriate. + +# Overview of the Simplification Process # + +The free function that implements the simplification algorithm takes not only the surface +and the desired stop predicate but a number of additional parameters which control and +monitor the simplification process. This section briefly describes the process in order +to set the background for the discussion of the parameters to the algorithm. + +There are two slightly different "edge" collapse operations. One is known as +edge-collapse while the other is known as halfedge-collapse. +Given an edge 'e' joining vertices 'w' and 'v', the edge-collapse operation replaces +'e','w' and 'v' for a new vertex 'r', while the halfedge-collapse operation +pulls 'v' into 'w', dissapearing 'e' and leaving 'w' in place. +In both cases the operation removes the edge 'e' along with the 2 triangles +adjacent to it. + +This package uses the halfedge-collapse operation, which is implemented by removing, +additionally, 1 vertex ('v') and 2 edges, one per adjacent triangle. +It optionally moves the remaining vertex ('w') into a new position, +called placement, in which case the net effect is the same as in +the edge-collapse operation. + +Naturally, the surface that results from an edge collapse deviates from the initial +surface by some amount, and since the goal of simplification is to reduce the number +of triangles while retaining the overall look of the surface as much as possible, +it is necessary to measure such a deviation. Some methods attempt to measure the +total deviation from the initial surface to the completely simplified surface, +for example, by tracking an accumulated error while keeping a history of the simplification +changes. Other methods, like the one implemented in this package, attempt to measure only +the cost of each individual edge collapse (the local deviation introduced by +a single simplification step) and plan the entire process as a sequence of steps +of increasing cost. + +Global error tracking methods produce highly accurate simplifications but take up a lot +of additional space. Cost-driven methods, like the one in this package, produce slightly +less accurate simplifications but take up much less additional space, even none in some cases. + +The cost-driven method implemented in this package is mainly based on \cite cgal:lt-fmeps-98, \cite cgal:lt-ems-99, with contributions from \cite hddms-mo-93, \cite gh-ssqem-97 +and \cite degn-tpec-98. + +The algorithm proceeds in two stages. In the first stage, called collection stage, +an initial collapse cost is assigned to each and every edge in the surface. +Then in the second stage, called collapsing stage, edges are +processed in order of increasing cost. Some processed edges are collapsed +while some are just discarded. Collapsed edges are replaced by a vertex and the collapse +cost of all the edges now incident on the replacement vertex is recalculated, affecting +the order of the remaining unprocessed edges. + +Not all edges selected for processing are collapsed. A processed edge can be discarded +right away, without being collapsed, if it doesn't satisfy certain topological +and geometric conditions. + +The algorithm presented in \cite gh-ssqem-97 contracts (collapses) arbitrary vertex pairs and not +only edges by considering certain vertex pairs as forming a pseudo-edge and proceeding to collapse +both edges and pseudo-edges in the same way as in \cite cgal:lt-fmeps-98, \cite cgal:lt-ems-99 ( +which is the algorithm implemented here). However, contracting an arbitrary vertex-pair may result in a non-manifold surface, but the current state of this package can only deal with manifold surfaces, thus, it can only collapse edges. That is, this package cannot be used as a framework for vertex contraction. + +# Cost Strategy # + +The specific way in which the collapse cost and vertex placement is +calculated is called the cost strategy. The user can choose +different strategies in the form of policies and related parameters, +passed to the algorithm. + +The current version of the package provides a set of policies implementing +two strategies: the Lindstrom-Turk strategy, which is the default, and +a strategy consisting of an edge-length cost with an optional +midpoint placement (much faster but less accurate). + +\subsection SurfaceMeshSimplificationLindstromTurkStrategy Lindstrom-Turk Cost and Placement Strategy + +The main characteristic of the strategy presented in +\cite cgal:lt-fmeps-98, \cite cgal:lt-ems-99 is that the simplified surface +is not compared at each step with the original surface (or the surface +at a previous step) so there is no need to keep extra information, +such as the original surface or a history of the local changes. Hence +the name memoryless simplification. + +At each step, all remaining edges are potential candidates for +collapsing and the one with the lowest cost is selected. + +The cost of collapsing an edge is given by the position chosen for the +vertex that replaces it. + +The replacement vertex position is computed as +the solution to a system of 3 linearly-independent linear equality constraints. +Each constraint is obtained by minimizing a quadratic objective function +subject to the previously computed constraints. + +There are several possible candidate constraints and each is considered in order of importance. +A candidate constraint might be incompatible with the previously accepted constraints, +in which case it is rejected and the next constraint is considered. + +Once 3 constraints have been accepted, the system is solved for the vertex position. + +The first constraints considered preserves the shape of the surface boundaries +(in case the edge profile has boundary edges). +The next constraints preserve the total volume of the surface. +The next constraints, if needed, optimize the local changes in volume and boundary shape. +Lastly, if a constraint is still needed (because the ones previously computed were incompatible), +a third (and last) constraint is added to favor equilateral triangles over elongated triangles. + +The cost is then a weighted sum of the shape, volume and boundary optimization terms, where the user specifies the unit weighting unit factor for each term. + +The local changes are computed independently for each edge using only +the triangles currently adjacent to it at the time when the edge +is about to be collapsed, that is, after all previous collapses. +Thus, the transitive path of minimal local changes yields at +the end a global change reasonably close to the absolute minimum. + +## Cost Strategy Policies ## + +The cost strategy used by the algorithm is selected by means of two policies: +`GetPlacement` and `GetCost`. + +The `GetPlacement` policy is called to compute the new position +for the remaining vertex after the halfedge-collapse. It returns +an optional value, which can be absent, in which case the +remaining vertex is kept in its place. + +The `GetCost` policy is called to compute the cost +of collapsing an edge. This policy uses the placement to compute +the cost (which is an error measure) and determines the +ordering of the edges. + +The algorithm maintains an internal data structure (a mutable priority queue) +which allows each edge to be processed in increasing cost order. Such a data structure +requires some per-edge additional information, such as the edge's cost. +If the record of per-edge additional information occupies N bytes of storage, +simplifying a surface of 1 million edges (a normal size) requires 1 million times N bytes +of additional storage. Thus, to minimize the amount of additional memory required to +simplify a surface only the cost is attached to each edge and nothing else. + +But this is a tradeoff: the cost of a collapse is a function of the placement +(the new position chosen for the remaining vertex) so before `GetCost` +is called for each and every edge, `GetPlacement` must also be called to obtain +the placement parameter to the cost function. +But that placement, which is a 3D Point, is not attached to each and every edge since +that would easily triple the additional storage requirement. + +On the one hand, this dramatically saves on memory but on the other hand is +a processing waste because when an edge is effectively collapsed, `GetPlacement` +must be called again to know were to move the remaining vertex. + +Earlier prototypes shown that attaching the placement to the edge, thus avoiding one +redundant call to the placement function after the edge collapsed, has little +impact on the total running time. This is because the cost of an each edge is not just +computed once but changes several times during the process so the placement function +must be called several times just as well. Caching the placement can only avoid the +very last call, when the edge is collapsed, but not all the previous calls which +are needed because the placement (and cost) changes. + +# API # + +## API Overview ## + +Since the algorithm is free from robustness issues there is no need for exact predicates nor constructions and `Simple_cartesian` can be used safely. +\footnote{In the current version, 3.3, the LindstromTurk policies are not implemented for homogeneous coordinates, so a cartesian kernel must be used.} + +The simplification algorithm is implemented as the free template function +`CGAL::Surface_mesh_simplification::edge_collapse`. The function has two mandatory and several optional parameters. + +## Mandatory Parameters ## + +There are two main parameters to the algorithm: the surface to be simplified (in-place) and the stop predicate. + +The surface to simplify must be a model of the `EdgeCollapsableMesh` concept. +Many concrete surface types, such as `CGAL::Polyhedron_3` with only triangular faces, +become models of that concept via a technique known as +external adaptation, which is described in \cite cgal:sll-bgl-02 +and this Bgl web page: http://www.boost.org/libs/graph/doc/leda_conversion.html + +External adaptation is a way to add an interface to an +object without coercing the type of the object (which happens when you adapt it by means +of a wrapper). That is, the formal parameter to the `edge_collapse` function that +implements the simplification is the concrete surface object itself, not an adaptor +which delegates the functionality to the concrete type. + +The stop predicate is called after each edge is selected for processing, before +it is classified as collapsible or not (thus before it is collapsed). If the stop predicate +returns `true` the algorithm terminates. + +## Optional Named Parameters ## + +The notion of named parameters was also introduced in the Bgl. You can read about it in \cite cgal:sll-bgl-02 or the following site: http://www.boost.org/libs/graph/doc/bgl_named_params.html. Named parameters allow the user to specify only those parameters which are really needed, by name, making the parameter ordering unimportant. + +Say there is a function `f()` that takes 3 parameters called `name`, `age` and `gender`, and you have variables `n,a and g` to pass as parameters to that function. Without named parameters, you would call it like this: `f(n,a,g)`, but with named parameters, you call it like this: `f(name(n).age(a).gender(g))`. + +That is, you give each parameter a name by wrapping it into a function whose name matches that of the parameter. The entire list of named parameters is really a composition of function calls separated by a dot (\f$ .\f$). Thus, if the function takes a mix of mandatory and named parameters, you use a comma to separate the last non-named parameter from the first named parameters, like this: + +`f(non_named_par0, non_named_pa1, name(n).age(a).gender(g)) ` + +When you use named parameters, the ordering is irrelevant, so this: `f(name(n).age(a).gender(g))` is equivalent to this: +`f(age(a).gender(g).name(n))`, and you can just omit any named parameter that has a default value. + +## Sample Call ## + +\code{.cpp} + +/* +surface : the surface to simplify +stop_predicate : policy indicating when the simplification must finish +vertex_index_map(vimap) : property-map giving each vertex a unique integer index +edge_index_map(eimap) : property-map giving each edge a unique integer index +edge_is_border_map(ebmap): property-map specifying whether an edge is a border edge or not +get_cost(cf) : function object computing the cost of a collapse +get_placement(pf) : function object computing the placement for the remaining vertex +visitor(vis) : function object tracking the simplification process +*/ +int r = edge_collapse(surface +,stop_predicate +,vertex_index_map(vimap) +.edge_index_map(eimap) +.edge_is_border_map(ebmap) +.get_cost(cf) +.get_placement(pf) +.visitor(vis) +); + +\endcode + +## Examples ## + +## Example Using a Default Polyhedron ## + +The following example illustrates the simplest of the cases. It uses +an ordinary polyhedron and only one of the optional parameters. +The unspecified cost strategy defaults to Lindstrom-Turk. +\cgalexample{edge_collapse_polyhedron.cpp} + +## Example Using an Enriched Polyhedron ## + +The following example is equivalent to the previous example but using an +enriched polyhedron whose halfedges support an `id` field to +store the edge index needed by the algorithm. It also shows how to +explicitly specify a cost strategy (other than the default) +and how to use a visitor object to track the simplification process. + +\cgalexample{edge_collapse_enriched_polyhedron.cpp} + +## Example with edges marked as non-removable ## + +The following example shows how to use the optional named parameter `edge_is_border_map` to prevent +edges from being removed even if they are not really borders. + +\cgalexample{edge_collapse_constrained_polyhedron.cpp} + +*/ +} /* namespace CGAL */ + diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.jpg b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.jpg new file mode 100644 index 00000000000..4f0ee0da003 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.jpg differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.pdf new file mode 100644 index 00000000000..8687f1b6f33 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/Illustration-Simplification-ALL.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.pdf new file mode 100644 index 00000000000..16504649607 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.png new file mode 100644 index 00000000000..d38694570aa Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse1.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.pdf new file mode 100644 index 00000000000..886fcff3db6 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.png new file mode 100644 index 00000000000..d8476096698 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse2.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.pdf new file mode 100644 index 00000000000..a31301cf0f2 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.png new file mode 100644 index 00000000000..a02d27af59d Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse3.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.pdf new file mode 100644 index 00000000000..b75ede14574 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.png new file mode 100644 index 00000000000..cdee63ab5bd Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/border_collapse4.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.pdf new file mode 100644 index 00000000000..0b9297e6961 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.pdf @@ -0,0 +1,403 @@ +%PDF-1.4 +%äöÜß +1 0 obj +<< /Length 2 0 R +>> +stream +0 w +q 0 -0.3 793.8 595.3 re W* n +0 0 0 rg +72 506.4 m +73.4 506.4 l 73.4 503.6 l 72 503.6 l 72 506.4 l h +f* +74.9 506.4 m +76.3 506.4 l 76.3 503.6 l 74.9 503.6 l 74.9 506.4 l h +f* +77.8 506.4 m +79.2 506.4 l 79.2 503.6 l 77.8 503.6 l 77.8 506.4 l h +f* +80.6 506.4 m +82.1 506.4 l 82.1 503.6 l 80.6 503.6 l 80.6 506.4 l h +f* +83.5 506.4 m +85 506.4 l 85 503.6 l 83.5 503.6 l 83.5 506.4 l h +f* +86.4 506.4 m +87.9 506.4 l 87.9 503.6 l 86.4 503.6 l 86.4 506.4 l h +f* +89.3 506.4 m +90.8 506.4 l 90.8 503.6 l 89.3 503.6 l 89.3 506.4 l h +f* +92.2 506.4 m +93.7 506.4 l 93.7 503.6 l 92.2 503.6 l 92.2 506.4 l h +f* +95.1 506.4 m +96.5 506.4 l 96.5 503.6 l 95.1 503.6 l 95.1 506.4 l h +f* +98 506.4 m +99.4 506.4 l 99.4 503.6 l 98 503.6 l 98 506.4 l h +f* +100.9 506.4 m +102.3 506.4 l 102.3 503.6 l 100.9 503.6 l 100.9 506.4 l +h +f* +103.8 506.4 m +105.2 506.4 l 105.2 503.6 l 103.8 503.6 l 103.8 506.4 l +h +f* +106.7 506.4 m +108.1 506.4 l 108.1 503.6 l 106.7 503.6 l 106.7 506.4 l +h +f* +109.6 506.4 m +111 506.4 l 111 503.6 l 109.6 503.6 l 109.6 506.4 l +h +f* +112.5 506.4 m +113.9 506.4 l 113.9 503.6 l 112.5 503.6 l 112.5 506.4 l +h +f* +115.3 506.4 m +116.8 506.4 l 116.8 503.6 l 115.3 503.6 l 115.3 506.4 l +h +f* +118.2 506.4 m +119.7 506.4 l 119.7 503.6 l 118.2 503.6 l 118.2 506.4 l +h +f* +121.1 506.4 m +122.6 506.4 l 122.6 503.6 l 121.1 503.6 l 121.1 506.4 l +h +f* +124 506.4 m +125.5 506.4 l 125.5 503.6 l 124 503.6 l 124 506.4 l h +f* +126.9 506.4 m +128.4 506.4 l 128.4 503.6 l 126.9 503.6 l 126.9 506.4 l +h +f* +129.8 506.4 m +131.2 506.4 l 131.2 503.6 l 129.8 503.6 l 129.8 506.4 l +h +f* +132.7 506.4 m +134.1 506.4 l 134.1 503.6 l 132.7 503.6 l 132.7 506.4 l +h +f* +135.6 506.4 m +137 506.4 l 137 503.6 l 135.6 503.6 l 135.6 506.4 l +h +f* +138.5 506.4 m +139.9 506.4 l 139.9 503.6 l 138.5 503.6 l 138.5 506.4 l +h +f* +141.4 506.4 m +142.8 506.4 l 142.8 503.6 l 141.4 503.6 l 141.4 506.4 l +h +f* +144.3 506.4 m +145.7 506.4 l 145.7 503.6 l 144.3 503.6 l 144.3 506.4 l +h +f* +147.1 506.4 m +148.6 506.4 l 148.6 503.6 l 147.1 503.6 l 147.1 506.4 l +h +f* +150 506.4 m +151.5 506.4 l 151.5 503.6 l 150 503.6 l 150 506.4 l h +f* +152.9 506.4 m +154.4 506.4 l 154.4 503.6 l 152.9 503.6 l 152.9 506.4 l +h +f* +155.8 506.4 m +157.3 506.4 l 157.3 503.6 l 155.8 503.6 l 155.8 506.4 l +h +f* +158.7 506.4 m +160.2 506.4 l 160.2 503.6 l 158.7 503.6 l 158.7 506.4 l +h +f* +161.6 506.4 m +162 506.4 l 162 503.6 l 161.6 503.6 l 161.6 506.4 l +h +f* +127.1 576.1 m +123.7 571.6 l 121.4 573.3 l 124.8 577.9 l 127.1 576.1 l +h +f* +122 569.3 m +118.5 564.7 l 116.2 566.5 l 119.7 571 l 122 569.3 l h +f* +116.8 562.4 m +113.4 557.8 l 111.1 559.6 l 114.5 564.1 l 116.8 562.4 l +h +f* +111.7 555.5 m +109.9 553.2 l 107.6 554.9 l 109.3 557.3 l 111.7 555.5 l +h +f* +108.2 550.9 m +106.4 548.6 l 104.1 550.3 l 105.9 552.7 l 108.2 550.9 l +h +f* +104.7 546.3 m +103 544 l 100.7 545.7 l 102.4 548 l 104.7 546.3 l h +f* +101.3 541.7 m +97.8 537.1 l 95.5 538.8 l 98.9 543.4 l 101.3 541.7 l +h +f* +96.1 534.8 m +92.7 530.2 l 90.4 532 l 93.8 536.5 l 96.1 534.8 l h +f* +90.9 527.9 m +87.5 523.4 l 85.2 525.1 l 88.6 529.7 l 90.9 527.9 l h +f* +85.8 521 m +84 518.7 l 81.8 520.5 l 83.5 522.8 l 85.8 521 l h +f* +82.3 516.4 m +80.6 514.1 l 78.3 515.9 l 80 518.2 l 82.3 516.4 l h +f* +78.9 511.8 m +77.1 509.5 l 74.8 511.2 l 76.5 513.5 l 78.9 511.8 l h +f* +75.4 507.2 m +73.1 504.1 l 70.8 505.9 l 73.1 508.9 l 75.4 507.2 l h +f* +0.50196 0 0 rg +160.7 504.4 m +124.7 576.4 l 127.2 577.7 l 163.2 505.7 l 160.7 504.4 l +h +f* +124.8 432.1 m +70.8 504.1 l 73.1 505.9 l 127.1 433.9 l 124.8 432.1 l +h +f* +0 0 0 rg +163.2 504.4 m +160.7 499.3 l 158.1 500.6 l 160.7 505.7 l 163.2 504.4 l +h +f* +159.4 496.7 m +156.9 491.6 l 154.3 492.9 l 156.8 498 l 159.4 496.7 l +h +f* +155.6 489 m +153 483.9 l 150.4 485.2 l 153 490.3 l 155.6 489 l h +f* +151.7 481.3 m +150.4 478.8 l 147.9 480 l 149.1 482.6 l 151.7 481.3 l +h +f* +149.1 476.1 m +147.9 473.6 l 145.3 474.9 l 146.6 477.4 l 149.1 476.1 l +h +f* +146.6 471 m +145.3 468.4 l 142.7 469.7 l 144 472.3 l 146.6 471 l h +f* +144 465.8 m +141.4 460.7 l 138.8 462 l 141.4 467.1 l 144 465.8 l h +f* +140.1 458.1 m +137.6 453 l 135 454.3 l 137.5 459.4 l 140.1 458.1 l +h +f* +136.3 450.5 m +133.7 445.4 l 131.2 446.6 l 133.7 451.7 l 136.3 450.5 l +h +f* +132.5 442.8 m +131.2 440.2 l 128.6 441.5 l 129.9 444.1 l 132.5 442.8 l +h +f* +129.9 437.6 m +128.6 435 l 126 436.3 l 127.3 438.9 l 129.9 437.6 l +h +f* +127.3 432.4 m +127.2 432.4 l 124.7 433.7 l 124.7 433.7 l 127.3 432.4 l +h +f* +0 0.50196 0 rg +18 506.4 m +72 506.4 l 72 503.6 l 18 503.6 l 18 506.4 l h +f* +37.2 577.7 m +73.2 505.7 l 70.7 504.4 l 34.7 576.4 l 37.2 577.7 l h +f* +0 0 0.50196 rg +234 503.6 m +162 503.6 l 162 506.4 l 234 506.4 l 234 503.6 l h +f* +217.1 576.1 m +163.1 504.1 l 160.8 505.9 l 214.8 577.9 l 217.1 576.1 l +h +f* +0 0 0 rg +36 578.4 m +126 578.4 l 126 575.6 l 36 575.6 l 36 578.4 l h +f* +216 575.6 m +126 575.6 l 126 578.4 l 216 578.4 l 216 575.6 l h +f* +126 431.6 m +36 431.6 l 36 434.5 l 126 434.5 l 126 431.6 l h +f* +0 0.50196 0 rg +73.2 504.4 m +37.2 432.4 l 34.7 433.7 l 70.7 505.7 l 73.2 504.4 l h +f* +0 0 0.50196 rg +163.1 505.9 m +217.1 433.9 l 214.8 432.1 l 160.8 504.1 l 163.1 505.9 l +h +f* +0 0 0 rg +126 434.5 m +216 434.5 l 216 431.6 l 126 431.6 l 126 434.5 l h +f* +217.4 577.4 m +235.4 505.4 l 232.6 504.7 l 214.6 576.7 l 217.4 577.4 l +h +f* +214.6 433.4 m +232.6 505.4 l 235.4 504.7 l 217.4 432.7 l 214.6 433.4 l +h +f* +34.6 432.7 m +16.6 504.7 l 19.4 505.4 l 37.4 433.4 l 34.6 432.7 l h +f* +16.6 505.4 m +34.6 577.4 l 37.4 576.7 l 19.4 504.7 l 16.6 505.4 l h +f* +0 0 0.50196 rg +412.8 505.9 m +466.8 577.9 l 469.1 576.1 l 415.1 504.1 l 412.8 505.9 l +h +f* +504 503.6 m +414 503.6 l 414 506.4 l 504 506.4 l 504 503.6 l h +f* +466.8 432.1 m +412.8 504.1 l 415.1 505.9 l 469.1 433.9 l 466.8 432.1 l +h +f* +0 0 0 rg +469.2 577.7 m +505.2 505.7 l 502.7 504.4 l 466.7 576.4 l 469.2 577.7 l +h +f* +466.7 433.7 m +502.7 505.7 l 505.2 504.4 l 469.2 432.4 l 466.7 433.7 l +h +f* +0.50196 0 0 rg +379.2 577.7 m +415.2 505.7 l 412.7 504.4 l 376.7 576.4 l 379.2 577.7 l +h +f* +0 0 0 rg +378 578.4 m +468 578.4 l 468 575.6 l 378 575.6 l 378 578.4 l h +f* +0 0.50196 0 rg +306.8 578.2 m +414.8 506.2 l 413.1 503.8 l 305.1 575.8 l 306.8 578.2 l +h +f* +270 506.4 m +414 506.4 l 414 503.6 l 270 503.6 l 270 506.4 l h +f* +0 0 0 rg +306 434.5 m +468 434.5 l 468 431.6 l 306 431.6 l 306 434.5 l h +f* +0.50196 0 0 rg +415.2 504.4 m +379.2 432.4 l 376.7 433.7 l 412.7 505.7 l 415.2 504.4 l +h +f* +0 0.50196 0 rg +305.1 434.2 m +413.1 506.2 l 414.8 503.8 l 306.8 431.8 l 305.1 434.2 l +h +f* +0 0 0 rg +378 575.6 m +306 575.6 l 306 578.4 l 378 578.4 l 378 575.6 l h +f* +268.7 505.7 m +304.7 577.7 l 307.2 576.4 l 271.2 504.4 l 268.7 505.7 l +h +f* +304.7 432.4 m +268.7 504.4 l 271.2 505.7 l 307.2 433.7 l 304.7 432.4 l +h +f* +Q endstream +endobj + +2 0 obj + 6872 +endobj + +4 0 obj +<< /Type /Page + /Parent 3 0 R + /MediaBox [ 0 0 794 595 ] + /Contents 1 0 R +>> +endobj + +5 0 obj +<< + /ProcSet [ /PDF ] +>> +endobj + +3 0 obj +<< /Type /Pages + /Resources 5 0 R + /MediaBox [ 0 0 595 842 ] + /Kids [ 4 0 R + ] + /Count 1 +>> +endobj + +6 0 obj +<< /Type /Catalog + /Pages 3 0 R +>> +endobj + +7 0 obj +<< /Author +/Creator +/Producer +/CreationDate (D:20060927094424-03'00') +>> +endobj + +xref +0 8 +0000000000 65535 f +0000000017 00000 n +0000006949 00000 n +0000007132 00000 n +0000006976 00000 n +0000007083 00000 n +0000007268 00000 n +0000007327 00000 n +trailer +<< /Size 8 + /Root 6 0 R + /Info 7 0 R +>> +startxref +7605 +%%EOF diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.png new file mode 100644 index 00000000000..3af7b3944c6 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse0.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.pdf new file mode 100644 index 00000000000..53fa4d84830 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.pdf @@ -0,0 +1,817 @@ +%PDF-1.4 +%äöÜß +1 0 obj +<< /Length 2 0 R +>> +stream +0 w +q 0 -0.3 793.8 595.3 re W* n +0 0 0 rg +236.4 454.6 m +223.6 458.7 l 223.7 450.2 l 236.4 454.6 l h +f* +0 0 0 RG +108.9 453.4 m +226.2 454.5 l S +0 0 0 rg +177 553.6 m +180.2 540.5 l 187.4 545.1 l 177 553.6 l h +f* +0 0 0 RG +237 458.9 m +182.4 544.9 l S +0 0 0 rg +110.8 458.9 m +121.4 467.2 l 114.3 471.9 l 110.8 458.9 l h +f* +0 0 0 RG +169.6 547.4 m +116.4 467.4 l S +0 0 0 rg +162.8 554.8 m +152.2 546.5 l 159.3 541.8 l 162.8 554.8 l h +f* +0 0 0 RG +104 465.1 m +157.2 546.3 l S +0 0 0 rg +246.3 457.1 m +243.2 470.2 l 236 465.7 l 246.3 457.1 l h +f* +0 0 0 RG +185.6 555.4 m +240.9 465.8 l S +0 0 0 rg +113.9 444.1 m +126.7 439.9 l 126.6 448.4 l 113.9 444.1 l h +f* +0 0 0 RG +232 444.1 m +230.6 444.1 l S +229.2 444.1 m +227.7 444.1 l S +226.3 444.1 m +224.8 444.1 l S +223.4 444.1 m +221.9 444.1 l S +220.5 444.1 m +219 444.1 l S +217.6 444.1 m +216.1 444.1 l S +214.7 444.1 m +213.3 444.1 l S +211.8 444.1 m +210.4 444.1 l S +208.9 444.1 m +207.5 444.1 l S +206 444.1 m +204.6 444.1 l S +203.1 444.1 m +201.7 444.1 l S +200.2 444.1 m +198.8 444.1 l S +197.3 444.1 m +195.9 444.1 l S +194.5 444.1 m +193 444.1 l S +191.6 444.1 m +190.1 444.1 l S +188.7 444.1 m +187.2 444.1 l S +185.8 444.1 m +184.3 444.1 l S +182.9 444.1 m +181.4 444.1 l S +180 444.1 m +178.6 444.1 l S +177.1 444.1 m +175.7 444.1 l S +174.2 444.1 m +172.8 444.1 l S +171.3 444.1 m +169.9 444.1 l S +168.4 444.1 m +167 444.1 l S +165.5 444.1 m +164.1 444.1 l S +162.7 444.1 m +161.2 444.1 l S +159.8 444.1 m +158.3 444.1 l S +156.9 444.1 m +155.4 444.1 l S +154 444.1 m +152.5 444.1 l S +151.1 444.1 m +149.6 444.1 l S +148.2 444.1 m +146.7 444.1 l S +145.3 444.1 m +143.9 444.1 l S +142.4 444.1 m +141 444.1 l S +139.5 444.1 m +138.1 444.1 l S +136.6 444.1 m +135.2 444.1 l S +133.7 444.1 m +132.3 444.1 l S +130.8 444.1 m +129.4 444.1 l S +128 444.1 m +126.5 444.1 l S +125.1 444.1 m +124.1 444.1 l S +q 0 0 0 rg +BT +165.8 455.9 Td /F1 24 Tf <65> Tj +ET +Q +q 0 0 0 rg +BT +183.8 493 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +ET +Q +q 0 0 0 rg +BT +218.4 507.9 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +12 0 Td <6F> Tj +ET +Q +q 0 0 0 rg +BT +138.6 489.3 Td /F1 24 Tf <65> Tj +10.7 0 Td <70> Tj +ET +Q +q 0 0 0 rg +BT +99.1 509.7 Td /F1 24 Tf <65> Tj +10.7 0 Td <70> Tj +11.9 0 Td <6F> Tj +ET +Q +q 0 0 0 rg +BT +95.5 437 Td /F1 24 Tf <76> Tj +ET +Q +q 0 0 0 rg +BT +239.5 437.4 Td /F1 24 Tf <77> Tj +ET +Q +0 0 0 rg +44.6 392.1 m +57 397.4 l 51.3 403.8 l 44.6 392.1 l h +f* +0 0 0 RG +94.1 436 m +93 435.1 l S +91.9 434.1 m +90.9 433.2 l S +89.8 432.2 m +88.7 431.2 l S +87.6 430.3 m +86.5 429.3 l S +85.4 428.4 m +84.4 427.4 l S +83.3 426.5 m +82.2 425.5 l S +81.1 424.5 m +80.1 423.6 l S +78.9 422.6 m +77.9 421.7 l S +76.8 420.7 m +75.7 419.7 l S +74.6 418.8 m +73.6 417.8 l S +72.5 416.9 m +71.4 415.9 l S +70.3 414.9 m +69.2 414 l S +68.1 413 m +67.1 412.1 l S +66 411.1 m +64.9 410.2 l S +63.8 409.2 m +62.7 408.2 l S +61.7 407.3 m +60.6 406.3 l S +59.5 405.3 m +58.4 404.4 l S +57.3 403.4 m +56.2 402.5 l S +55.2 401.5 m +54.1 400.5 l S +53 399.6 m +52.2 398.9 l S +0 0 0 rg +247.5 431.7 m +251.5 418.9 l 258.4 423.8 l 247.5 431.7 l h +f* +0 0 0 RG +282.1 383.5 m +281.3 384.6 l S +280.4 385.8 m +279.6 387 l S +278.8 388.2 m +277.9 389.3 l S +277.1 390.5 m +276.2 391.7 l S +275.4 392.9 m +274.5 394 l S +273.7 395.2 m +272.8 396.4 l S +272 397.6 m +271.2 398.7 l S +270.3 399.9 m +269.5 401.1 l S +268.6 402.2 m +267.8 403.4 l S +266.9 404.6 m +266.1 405.8 l S +265.3 406.9 m +264.4 408.1 l S +263.6 409.3 m +262.7 410.5 l S +261.9 411.7 m +261 412.8 l S +260.2 414 m +259.3 415.2 l S +258.5 416.3 m +257.7 417.5 l S +256.8 418.7 m +256 419.9 l S +255.1 421 m +254.3 422.2 l S +253.4 423.4 m +253.4 423.4 l S +q 0 0 0 rg +BT +164.6 420 Td /F1 24 Tf <65> Tj +10.7 0 Td <27> Tj +ET +Q +q 0 0 0 rg +BT +73.7 395.9 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +12 0 Td <27> Tj +ET +Q +q 0 0 0 rg +BT +242.6 383.5 Td /F1 24 Tf <65> Tj +10.7 0 Td <70> Tj +11.9 0 Td <27> Tj +ET +Q +0 0 0 rg +454 545.2 m +449.8 532.5 l 458.3 532.5 l 454 545.2 l h +f* +0 0 0 RG +454.4 449.6 m +454.1 535 l S +0 0 0 rg +461.3 450.8 m +465.5 463.6 l 457 463.6 l 461.3 450.8 l h +f* +0 0 0 RG +461 541.3 m +461.3 461 l S +q 0 0 0 rg +BT +471.5 497.3 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +11.9 0 Td <6F> Tj +ET +Q +q 0 0 0 rg +BT +417.1 498.6 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +ET +Q +q 0 0 0 rg +BT +449.9 425.6 Td /F1 24 Tf <77> Tj +ET +Q +0 0 0 rg +338.5 382.8 m +351.9 384 l 348.4 391.8 l 338.5 382.8 l h +f* +0 0 0 RG +443.8 429.1 m +442.5 428.6 l S +441.2 428 m +439.9 427.4 l S +438.5 426.8 m +437.2 426.3 l S +435.9 425.7 m +434.6 425.1 l S +433.2 424.5 m +431.9 423.9 l S +430.6 423.3 m +429.3 422.8 l S +427.9 422.2 m +426.6 421.6 l S +425.3 421 m +424 420.4 l S +422.7 419.8 m +421.3 419.3 l S +420 418.7 m +418.7 418.1 l S +417.4 417.5 m +416 416.9 l S +414.7 416.4 m +413.4 415.8 l S +412.1 415.2 m +410.7 414.6 l S +409.4 414 m +408.1 413.4 l S +406.8 412.9 m +405.5 412.3 l S +404.1 411.7 m +402.8 411.1 l S +401.5 410.5 m +400.2 410 l S +398.8 409.4 m +397.5 408.8 l S +396.2 408.2 m +394.9 407.6 l S +393.6 407 m +392.2 406.5 l S +390.9 405.9 m +389.6 405.3 l S +388.3 404.7 m +386.9 404.1 l S +385.6 403.5 m +384.3 403 l S +383 402.4 m +381.6 401.8 l S +380.3 401.2 m +379 400.6 l S +377.7 400.1 m +376.4 399.5 l S +375 398.9 m +373.7 398.3 l S +372.4 397.7 m +371.1 397.1 l S +369.7 396.6 m +368.4 396 l S +367.1 395.4 m +365.8 394.8 l S +364.5 394.2 m +363.1 393.7 l S +361.8 393.1 m +360.5 392.5 l S +359.1 391.9 m +357.8 391.3 l S +356.5 390.7 m +355.2 390.2 l S +353.8 389.6 m +352.5 389 l S +351.2 388.4 m +349.9 387.8 l S +348.5 387.2 m +347.8 386.9 l S +0 0 0 rg +468 427.3 m +477.5 417.8 l 481.3 425.5 l 468 427.3 l h +f* +0 0 0 RG +576 374.1 m +574.7 374.8 l S +573.4 375.4 m +572.1 376.1 l S +570.8 376.7 m +569.5 377.3 l S +568.2 378 m +566.9 378.6 l S +565.6 379.3 m +564.3 379.9 l S +563 380.5 m +561.7 381.2 l S +560.4 381.8 m +559.1 382.4 l S +557.8 383.1 m +556.5 383.7 l S +555.2 384.4 m +553.9 385 l S +552.6 385.6 m +551.3 386.3 l S +550 386.9 m +548.8 387.5 l S +547.5 388.2 m +546.2 388.8 l S +544.8 389.5 m +543.5 390.1 l S +542.3 390.7 m +541 391.4 l S +539.7 392 m +538.4 392.6 l S +537.1 393.3 m +535.8 393.9 l S +534.5 394.6 m +533.2 395.2 l S +531.9 395.8 m +530.6 396.5 l S +529.3 397.1 m +528 397.8 l S +526.7 398.4 m +525.4 399 l S +524.1 399.7 m +522.8 400.3 l S +521.5 400.9 m +520.2 401.6 l S +518.9 402.2 m +517.6 402.9 l S +516.3 403.5 m +515 404.1 l S +513.7 404.8 m +512.4 405.4 l S +511.1 406 m +509.8 406.7 l S +508.5 407.3 m +507.2 408 l S +505.9 408.6 m +504.7 409.2 l S +503.3 409.9 m +502 410.5 l S +500.7 411.1 m +499.5 411.8 l S +498.2 412.4 m +496.9 413.1 l S +495.6 413.7 m +494.3 414.3 l S +493 415 m +491.7 415.6 l S +490.4 416.2 m +489.1 416.9 l S +487.8 417.5 m +486.5 418.2 l S +485.2 418.8 m +483.9 419.5 l S +482.6 420.1 m +481.3 420.7 l S +480 421.4 m +478.7 422 l S +477.4 422.7 m +477.1 422.8 l S +q 0 0 0 rg +BT +390.4 385.3 Td /F1 24 Tf <65> Tj +10.7 0 Td <6E> Tj +12 0 Td <27> Tj +ET +Q +q 0 0 0 rg +BT +496.2 379.8 Td /F1 24 Tf <65> Tj +10.7 0 Td <70> Tj +12 0 Td <27> Tj +ET +Q +0 0 0 rg +365.4 460.6 m +343 468.1 l 343 453.2 l 365.4 460.6 l h +f* +278.8 462.8 m +347.4 462.8 l 347.4 458.5 l 278.8 458.5 l 278.8 462.8 l +h +f* +0 0 0 RG +101.2 431 m +100.7 431 l 100.2 431 l 99.8 431 l 99.3 431.1 l 98.8 431.2 l +98.4 431.3 l 97.9 431.4 l 97.5 431.6 l 97 431.7 l 96.6 431.9 l 96.2 432 l +95.7 432.2 l 95.3 432.4 l 94.9 432.7 l 94.5 432.9 l 94.1 433.1 l 93.7 433.4 l +93.4 433.7 l 93 434 l 92.7 434.3 l 92.3 434.6 l 92 434.9 l 91.7 435.3 l +91.4 435.6 l 91.1 436 l 90.8 436.3 l 90.5 436.7 l 90.3 437.1 l 90 437.5 l +89.8 437.9 l 89.5 438.3 l 89.3 438.8 l 89.1 439.2 l 89 439.7 l 88.8 440.1 l +88.6 440.6 l 88.5 441 l 88.4 441.5 l 88.3 442 l 88.2 442.5 l 88.1 442.9 l +88 443.5 l 88 444 l 88 444.5 l 88 445 l 88 445.5 l 88 446 l 88 446.5 l +88.1 447 l 88.2 447.5 l 88.3 448 l 88.4 448.4 l 88.5 448.9 l 88.6 449.4 l +88.8 449.9 l 89 450.3 l 89.1 450.7 l 89.3 451.2 l 89.5 451.6 l 89.8 452 l +90 452.4 l 90.3 452.8 l 90.5 453.2 l 90.8 453.6 l 91.1 454 l 91.4 454.3 l +91.7 454.7 l 92 455 l 92.3 455.4 l 92.7 455.7 l 93 456 l 93.4 456.3 l +93.7 456.6 l 94.1 456.8 l 94.5 457.1 l 94.9 457.3 l 95.3 457.5 l 95.7 457.7 l +96.2 457.9 l 96.6 458.1 l 97 458.3 l 97.5 458.4 l 97.9 458.5 l 98.4 458.7 l +98.8 458.8 l 99.3 458.8 l 99.8 458.9 l 100.2 458.9 l 100.7 459 l 101.2 459 l +101.7 459 l 102.1 458.9 l 102.6 458.9 l 103.1 458.8 l 103.5 458.8 l +104 458.7 l 104.5 458.5 l 104.9 458.4 l 105.4 458.3 l 105.8 458.1 l +106.2 457.9 l 106.6 457.7 l 107 457.5 l 107.5 457.3 l 107.9 457.1 l +108.2 456.8 l 108.6 456.6 l 109 456.3 l 109.3 456 l 109.7 455.7 l 110 455.4 l +110.4 455 l 110.7 454.7 l 111 454.3 l 111.3 454 l 111.6 453.6 l 111.8 453.2 l +112.1 452.8 l 112.3 452.4 l 112.6 452 l 112.8 451.6 l 113 451.2 l 113.2 450.7 l +113.4 450.3 l 113.6 449.9 l 113.7 449.4 l 113.9 448.9 l 114 448.4 l +114.1 448 l 114.2 447.5 l 114.3 447 l 114.3 446.5 l 114.3 446 l 114.4 445.5 l +114.4 445 l 114.4 444.5 l 114.3 444 l 114.3 443.5 l 114.3 442.9 l 114.2 442.5 l +114.1 442 l 114 441.5 l 113.9 441 l 113.7 440.6 l 113.6 440.1 l 113.4 439.7 l +113.2 439.2 l 113 438.8 l 112.8 438.3 l 112.6 437.9 l 112.3 437.5 l +112.1 437.1 l 111.8 436.7 l 111.6 436.3 l 111.3 436 l 111 435.6 l 110.7 435.3 l +110.4 434.9 l 110 434.6 l 109.7 434.3 l 109.3 434 l 109 433.7 l 108.6 433.4 l +108.2 433.1 l 107.9 432.9 l 107.5 432.7 l 107 432.4 l 106.6 432.2 l +106.2 432 l 105.8 431.9 l 105.4 431.7 l 104.9 431.6 l 104.5 431.4 l +104 431.3 l 103.5 431.2 l 103.1 431.1 l 102.6 431 l 102.1 431 l 101.7 431 l +101.2 431 l h +S +247.3 429.4 m +246.8 429.4 l 246.4 429.4 l 245.9 429.5 l 245.4 429.5 l +244.9 429.6 l 244.5 429.7 l 244 429.8 l 243.6 430 l 243.1 430.1 l 242.7 430.3 l +242.3 430.4 l 241.9 430.6 l 241.5 430.8 l 241 431.1 l 240.6 431.3 l +240.3 431.6 l 239.9 431.8 l 239.5 432.1 l 239.2 432.4 l 238.8 432.7 l +238.5 433 l 238.1 433.3 l 237.8 433.7 l 237.5 434 l 237.2 434.4 l 236.9 434.8 l +236.7 435.1 l 236.4 435.5 l 236.2 435.9 l 235.9 436.3 l 235.7 436.7 l +235.5 437.2 l 235.3 437.6 l 235.1 438.1 l 234.9 438.5 l 234.8 439 l +234.6 439.4 l 234.5 439.9 l 234.4 440.4 l 234.3 440.9 l 234.2 441.4 l +234.2 441.9 l 234.1 442.4 l 234.1 442.9 l 234.1 443.4 l 234.1 443.9 l +234.1 444.4 l 234.2 444.9 l 234.2 445.4 l 234.3 445.9 l 234.4 446.4 l +234.5 446.9 l 234.6 447.3 l 234.8 447.8 l 234.9 448.3 l 235.1 448.7 l +235.3 449.2 l 235.5 449.6 l 235.7 450 l 235.9 450.4 l 236.2 450.9 l +236.4 451.3 l 236.7 451.7 l 236.9 452 l 237.2 452.4 l 237.5 452.8 l +237.8 453.1 l 238.1 453.4 l 238.5 453.8 l 238.8 454.1 l 239.2 454.4 l +239.5 454.7 l 239.9 455 l 240.3 455.2 l 240.6 455.5 l 241 455.7 l 241.5 455.9 l +241.9 456.1 l 242.3 456.3 l 242.7 456.5 l 243.1 456.7 l 243.6 456.8 l +244 457 l 244.5 457.1 l 244.9 457.2 l 245.4 457.2 l 245.9 457.3 l 246.4 457.3 l +246.8 457.4 l 247.3 457.4 l 247.8 457.4 l 248.3 457.3 l 248.7 457.3 l +249.2 457.2 l 249.7 457.2 l 250.1 457.1 l 250.6 457 l 251 456.8 l 251.5 456.7 l +251.9 456.5 l 252.3 456.3 l 252.8 456.1 l 253.2 455.9 l 253.6 455.7 l +254 455.5 l 254.4 455.2 l 254.7 455 l 255.1 454.7 l 255.5 454.4 l 255.8 454.1 l +256.2 453.8 l 256.5 453.4 l 256.8 453.1 l 257.1 452.8 l 257.4 452.4 l +257.7 452 l 258 451.7 l 258.2 451.3 l 258.5 450.9 l 258.7 450.4 l 258.9 450 l +259.1 449.6 l 259.3 449.2 l 259.5 448.7 l 259.7 448.3 l 259.9 447.8 l +260 447.3 l 260.1 446.9 l 260.2 446.4 l 260.3 445.9 l 260.4 445.4 l +260.4 444.9 l 260.5 444.4 l 260.5 443.9 l 260.5 443.4 l 260.5 442.9 l +260.5 442.4 l 260.4 441.9 l 260.4 441.4 l 260.3 440.9 l 260.2 440.4 l +260.1 439.9 l 260 439.4 l 259.9 439 l 259.7 438.5 l 259.5 438.1 l 259.3 437.6 l +259.1 437.2 l 258.9 436.7 l 258.7 436.3 l 258.5 435.9 l 258.2 435.5 l +258 435.1 l 257.7 434.8 l 257.4 434.4 l 257.1 434 l 256.8 433.7 l 256.5 433.3 l +256.2 433 l 255.8 432.7 l 255.5 432.4 l 255.1 432.1 l 254.7 431.8 l +254.4 431.6 l 254 431.3 l 253.6 431.1 l 253.2 430.8 l 252.8 430.6 l +252.3 430.4 l 251.9 430.3 l 251.5 430.1 l 251 430 l 250.6 429.8 l 250.1 429.7 l +249.7 429.6 l 249.2 429.5 l 248.7 429.5 l 248.3 429.4 l 247.8 429.4 l +247.3 429.4 l h +S +171.9 549 m +171.4 549.1 l 171 549.1 l 170.5 549.1 l 170 549.2 l 169.6 549.2 l +169.1 549.4 l 168.7 549.5 l 168.2 549.6 l 167.8 549.8 l 167.3 549.9 l +166.9 550.1 l 166.5 550.3 l 166.1 550.5 l 165.7 550.7 l 165.3 550.9 l +164.9 551.2 l 164.5 551.5 l 164.1 551.7 l 163.8 552 l 163.4 552.3 l +163.1 552.7 l 162.8 553 l 162.5 553.3 l 162.1 553.7 l 161.8 554 l 161.5 554.4 l +161.3 554.8 l 161 555.2 l 160.8 555.6 l 160.5 556 l 160.3 556.4 l 160.1 556.8 l +159.9 557.3 l 159.7 557.7 l 159.6 558.1 l 159.4 558.6 l 159.3 559.1 l +159.1 559.6 l 159 560 l 158.9 560.5 l 158.9 561 l 158.8 561.5 l 158.8 562 l +158.7 562.5 l 158.7 563 l 158.7 563.6 l 158.8 564 l 158.8 564.6 l 158.9 565.1 l +158.9 565.5 l 159 566 l 159.1 566.5 l 159.3 567 l 159.4 567.4 l 159.6 567.9 l +159.7 568.4 l 159.9 568.8 l 160.1 569.3 l 160.3 569.7 l 160.5 570.1 l +160.8 570.5 l 161 570.9 l 161.3 571.3 l 161.5 571.7 l 161.8 572 l 162.1 572.4 l +162.5 572.7 l 162.8 573.1 l 163.1 573.4 l 163.4 573.7 l 163.8 574.1 l +164.1 574.3 l 164.5 574.6 l 164.9 574.9 l 165.3 575.1 l 165.7 575.4 l +166.1 575.6 l 166.5 575.8 l 166.9 576 l 167.3 576.1 l 167.8 576.3 l +168.2 576.5 l 168.7 576.6 l 169.1 576.7 l 169.6 576.8 l 170 576.9 l +170.5 577 l 171 577 l 171.4 577 l 171.9 577 l 172.4 577 l 172.9 577 l +173.4 577 l 173.8 576.9 l 174.3 576.8 l 174.8 576.7 l 175.2 576.6 l +175.7 576.5 l 176.1 576.3 l 176.5 576.1 l 177 576 l 177.4 575.8 l 177.8 575.6 l +178.2 575.4 l 178.6 575.1 l 179 574.9 l 179.4 574.6 l 179.7 574.3 l +180.1 574.1 l 180.5 573.7 l 180.8 573.4 l 181.1 573.1 l 181.4 572.7 l +181.7 572.4 l 182 572 l 182.3 571.7 l 182.6 571.3 l 182.9 570.9 l 183.1 570.5 l +183.3 570.1 l 183.6 569.7 l 183.8 569.3 l 184 568.8 l 184.1 568.4 l +184.3 567.9 l 184.5 567.4 l 184.6 567 l 184.7 566.5 l 184.8 566 l 184.9 565.5 l +185 565.1 l 185.1 564.6 l 185.1 564 l 185.1 563.6 l 185.2 563 l 185.1 562.5 l +185.1 562 l 185.1 561.5 l 185 561 l 184.9 560.5 l 184.8 560 l 184.7 559.6 l +184.6 559.1 l 184.5 558.6 l 184.3 558.1 l 184.1 557.7 l 184 557.3 l +183.8 556.8 l 183.6 556.4 l 183.3 556 l 183.1 555.6 l 182.9 555.2 l +182.6 554.8 l 182.3 554.4 l 182 554 l 181.7 553.7 l 181.4 553.3 l 181.1 553 l +180.8 552.7 l 180.5 552.3 l 180.1 552 l 179.7 551.7 l 179.4 551.5 l +179 551.2 l 178.6 550.9 l 178.2 550.7 l 177.8 550.5 l 177.4 550.3 l +177 550.1 l 176.5 549.9 l 176.1 549.8 l 175.7 549.6 l 175.2 549.5 l +174.8 549.4 l 174.3 549.2 l 173.8 549.2 l 173.4 549.1 l 172.9 549.1 l +172.4 549.1 l 171.9 549 l h +S +457.9 545.9 m +457.4 546 l 456.9 546 l 456.5 546 l 456 546.1 l 455.5 546.2 l +455.1 546.3 l 454.6 546.4 l 454.2 546.5 l 453.7 546.7 l 453.3 546.8 l +452.9 547 l 452.4 547.2 l 452 547.4 l 451.6 547.6 l 451.2 547.9 l 450.9 548.1 l +450.5 548.4 l 450.1 548.7 l 449.7 548.9 l 449.4 549.2 l 449 549.6 l +448.7 549.9 l 448.4 550.2 l 448.1 550.6 l 447.8 550.9 l 447.5 551.3 l +447.3 551.7 l 447 552.1 l 446.7 552.5 l 446.5 552.9 l 446.3 553.3 l +446.1 553.7 l 445.9 554.2 l 445.7 554.6 l 445.5 555.1 l 445.4 555.5 l +445.2 556 l 445.1 556.5 l 445 557 l 444.9 557.4 l 444.8 557.9 l 444.8 558.4 l +444.7 558.9 l 444.7 559.4 l 444.7 559.9 l 444.7 560.5 l 444.7 561 l +444.8 561.5 l 444.8 562 l 444.9 562.5 l 445 562.9 l 445.1 563.4 l 445.2 563.9 l +445.4 564.4 l 445.5 564.8 l 445.7 565.3 l 445.9 565.7 l 446.1 566.2 l +446.3 566.6 l 446.5 567 l 446.7 567.4 l 447 567.8 l 447.3 568.2 l 447.5 568.6 l +447.8 568.9 l 448.1 569.3 l 448.4 569.7 l 448.7 570 l 449 570.3 l 449.4 570.7 l +449.7 571 l 450.1 571.2 l 450.5 571.5 l 450.9 571.8 l 451.2 572 l 451.6 572.3 l +452 572.5 l 452.4 572.7 l 452.9 572.9 l 453.3 573.1 l 453.7 573.2 l +454.2 573.4 l 454.6 573.5 l 455.1 573.6 l 455.5 573.7 l 456 573.8 l +456.5 573.9 l 456.9 573.9 l 457.4 573.9 l 457.9 573.9 l 458.4 573.9 l +458.8 573.9 l 459.3 573.9 l 459.8 573.8 l 460.3 573.7 l 460.7 573.6 l +461.2 573.5 l 461.6 573.4 l 462.1 573.2 l 462.5 573.1 l 462.9 572.9 l +463.4 572.7 l 463.7 572.5 l 464.2 572.3 l 464.6 572 l 464.9 571.8 l +465.3 571.5 l 465.7 571.2 l 466 571 l 466.4 570.7 l 466.8 570.3 l 467.1 570 l +467.4 569.7 l 467.7 569.3 l 468 568.9 l 468.3 568.6 l 468.5 568.2 l +468.8 567.8 l 469 567.4 l 469.3 567 l 469.5 566.6 l 469.7 566.2 l 469.9 565.7 l +470.1 565.3 l 470.3 564.8 l 470.4 564.4 l 470.6 563.9 l 470.7 563.4 l +470.8 562.9 l 470.9 562.5 l 471 562 l 471 561.5 l 471.1 561 l 471.1 560.5 l +471.1 559.9 l 471.1 559.4 l 471.1 558.9 l 471 558.4 l 471 557.9 l 470.9 557.4 l +470.8 557 l 470.7 556.5 l 470.6 556 l 470.4 555.5 l 470.3 555.1 l 470.1 554.6 l +469.9 554.2 l 469.7 553.7 l 469.5 553.3 l 469.3 552.9 l 469 552.5 l +468.8 552.1 l 468.5 551.7 l 468.3 551.3 l 468 550.9 l 467.7 550.6 l +467.4 550.2 l 467.1 549.9 l 466.8 549.6 l 466.4 549.2 l 466 548.9 l +465.7 548.7 l 465.3 548.4 l 464.9 548.1 l 464.6 547.9 l 464.2 547.6 l +463.7 547.4 l 463.4 547.2 l 462.9 547 l 462.5 546.8 l 462.1 546.7 l +461.6 546.5 l 461.2 546.4 l 460.7 546.3 l 460.3 546.2 l 459.8 546.1 l +459.3 546 l 458.8 546 l 458.4 546 l 457.9 545.9 l h +S +457.1 419.3 m +456.6 419.3 l 456.2 419.3 l 455.7 419.4 l 455.2 419.5 l +454.7 419.5 l 454.3 419.6 l 453.8 419.7 l 453.4 419.9 l 452.9 420 l +452.5 420.2 l 452.1 420.4 l 451.6 420.6 l 451.2 420.8 l 450.8 421 l +450.4 421.2 l 450.1 421.5 l 449.7 421.7 l 449.3 422 l 449 422.3 l 448.6 422.6 l +448.2 422.9 l 447.9 423.2 l 447.6 423.6 l 447.3 423.9 l 447 424.3 l +446.7 424.7 l 446.5 425 l 446.2 425.4 l 445.9 425.8 l 445.7 426.3 l +445.5 426.7 l 445.3 427.1 l 445.1 427.5 l 444.9 428 l 444.7 428.4 l +444.6 428.9 l 444.4 429.3 l 444.3 429.8 l 444.2 430.3 l 444.1 430.8 l +444 431.3 l 444 431.8 l 443.9 432.3 l 443.9 432.8 l 443.9 433.3 l 443.9 433.8 l +443.9 434.3 l 444 434.8 l 444 435.3 l 444.1 435.8 l 444.2 436.3 l 444.3 436.8 l +444.4 437.3 l 444.6 437.7 l 444.7 438.2 l 444.9 438.6 l 445.1 439.1 l +445.3 439.5 l 445.5 439.9 l 445.7 440.3 l 445.9 440.8 l 446.2 441.2 l +446.5 441.6 l 446.7 441.9 l 447 442.3 l 447.3 442.7 l 447.6 443 l 447.9 443.3 l +448.2 443.7 l 448.6 444 l 449 444.3 l 449.3 444.6 l 449.7 444.9 l 450.1 445.1 l +450.4 445.4 l 450.8 445.6 l 451.2 445.8 l 451.6 446 l 452.1 446.2 l +452.5 446.4 l 452.9 446.6 l 453.4 446.7 l 453.8 446.9 l 454.3 447 l +454.7 447.1 l 455.2 447.1 l 455.7 447.2 l 456.2 447.3 l 456.6 447.3 l +457.1 447.3 l 457.6 447.3 l 458.1 447.3 l 458.5 447.2 l 459 447.1 l +459.5 447.1 l 459.9 447 l 460.4 446.9 l 460.8 446.7 l 461.3 446.6 l +461.7 446.4 l 462.1 446.2 l 462.6 446 l 463 445.8 l 463.4 445.6 l 463.8 445.4 l +464.1 445.1 l 464.5 444.9 l 464.9 444.6 l 465.3 444.3 l 465.6 444 l +466 443.7 l 466.3 443.3 l 466.6 443 l 466.9 442.7 l 467.2 442.3 l 467.5 441.9 l +467.7 441.6 l 468 441.2 l 468.3 440.8 l 468.5 440.3 l 468.7 439.9 l +468.9 439.5 l 469.1 439.1 l 469.3 438.6 l 469.5 438.2 l 469.6 437.7 l +469.8 437.3 l 469.9 436.8 l 470 436.3 l 470.1 435.8 l 470.2 435.3 l +470.2 434.8 l 470.3 434.3 l 470.3 433.8 l 470.3 433.3 l 470.3 432.8 l +470.3 432.3 l 470.2 431.8 l 470.2 431.3 l 470.1 430.8 l 470 430.3 l +469.9 429.8 l 469.8 429.3 l 469.6 428.9 l 469.5 428.4 l 469.3 428 l +469.1 427.5 l 468.9 427.1 l 468.7 426.7 l 468.5 426.3 l 468.3 425.8 l +468 425.4 l 467.7 425 l 467.5 424.7 l 467.2 424.3 l 466.9 423.9 l 466.6 423.6 l +466.3 423.2 l 466 422.9 l 465.6 422.6 l 465.3 422.3 l 464.9 422 l 464.5 421.7 l +464.1 421.5 l 463.8 421.2 l 463.4 421 l 463 420.8 l 462.6 420.6 l 462.1 420.4 l +461.7 420.2 l 461.3 420 l 460.8 419.9 l 460.4 419.7 l 459.9 419.6 l +459.5 419.5 l 459 419.5 l 458.5 419.4 l 458.1 419.3 l 457.6 419.3 l +457.1 419.3 l h +S +101.2 430.9 m +100.7 431 l 100.3 431 l 99.8 431 l 99.3 431.1 l 98.8 431.2 l +98.4 431.3 l 97.9 431.4 l 97.5 431.5 l 97 431.7 l 96.6 431.8 l 96.2 432 l +95.8 432.2 l 95.4 432.4 l 94.9 432.6 l 94.5 432.9 l 94.2 433.1 l 93.8 433.4 l +93.4 433.7 l 93.1 433.9 l 92.7 434.2 l 92.4 434.6 l 92 434.9 l 91.7 435.2 l +91.4 435.6 l 91.1 435.9 l 90.8 436.3 l 90.6 436.7 l 90.3 437.1 l 90.1 437.5 l +89.8 437.9 l 89.6 438.3 l 89.4 438.7 l 89.2 439.2 l 89 439.6 l 88.8 440.1 l +88.7 440.5 l 88.5 441 l 88.4 441.5 l 88.3 442 l 88.2 442.4 l 88.1 442.9 l +88.1 443.4 l 88 443.9 l 88 444.4 l 88 444.9 l 88 445.5 l 88 446 l 88.1 446.5 l +88.1 447 l 88.2 447.5 l 88.3 447.9 l 88.4 448.4 l 88.5 448.9 l 88.7 449.4 l +88.8 449.8 l 89 450.3 l 89.2 450.7 l 89.4 451.2 l 89.6 451.6 l 89.8 452 l +90.1 452.4 l 90.3 452.8 l 90.6 453.2 l 90.8 453.6 l 91.1 453.9 l 91.4 454.3 l +91.7 454.7 l 92 455 l 92.4 455.3 l 92.7 455.6 l 93.1 456 l 93.4 456.2 l +93.8 456.5 l 94.2 456.8 l 94.5 457 l 94.9 457.3 l 95.4 457.5 l 95.8 457.7 l +96.2 457.9 l 96.6 458.1 l 97 458.2 l 97.5 458.4 l 97.9 458.5 l 98.4 458.6 l +98.8 458.7 l 99.3 458.8 l 99.8 458.9 l 100.3 458.9 l 100.7 458.9 l +101.2 458.9 l 101.7 458.9 l 102.2 458.9 l 102.6 458.9 l 103.1 458.8 l +103.6 458.7 l 104 458.6 l 104.5 458.5 l 104.9 458.4 l 105.4 458.2 l +105.8 458.1 l 106.2 457.9 l 106.7 457.7 l 107.1 457.5 l 107.5 457.3 l +107.9 457 l 108.3 456.8 l 108.7 456.5 l 109 456.2 l 109.4 456 l 109.7 455.6 l +110.1 455.3 l 110.4 455 l 110.7 454.7 l 111 454.3 l 111.3 453.9 l 111.6 453.6 l +111.9 453.2 l 112.1 452.8 l 112.4 452.4 l 112.6 452 l 112.8 451.6 l +113 451.2 l 113.2 450.7 l 113.4 450.3 l 113.6 449.8 l 113.8 449.4 l +113.9 448.9 l 114 448.4 l 114.1 447.9 l 114.2 447.5 l 114.3 447 l 114.3 446.5 l +114.4 446 l 114.4 445.5 l 114.4 444.9 l 114.4 444.4 l 114.4 443.9 l +114.3 443.4 l 114.3 442.9 l 114.2 442.4 l 114.1 442 l 114 441.5 l 113.9 441 l +113.8 440.5 l 113.6 440.1 l 113.4 439.6 l 113.2 439.2 l 113 438.7 l +112.8 438.3 l 112.6 437.9 l 112.4 437.5 l 112.1 437.1 l 111.9 436.7 l +111.6 436.3 l 111.3 435.9 l 111 435.6 l 110.7 435.2 l 110.4 434.9 l +110.1 434.6 l 109.7 434.2 l 109.4 433.9 l 109 433.7 l 108.7 433.4 l +108.3 433.1 l 107.9 432.9 l 107.5 432.6 l 107.1 432.4 l 106.7 432.2 l +106.2 432 l 105.8 431.8 l 105.4 431.7 l 104.9 431.5 l 104.5 431.4 l +104 431.3 l 103.6 431.2 l 103.1 431.1 l 102.6 431 l 102.2 431 l 101.7 431 l +101.2 430.9 l h +S +101.2 430.9 m +100.7 431 l 100.3 431 l 99.8 431 l 99.3 431.1 l 98.8 431.2 l +98.4 431.3 l 97.9 431.4 l 97.5 431.5 l 97 431.7 l 96.6 431.8 l 96.2 432 l +95.8 432.2 l 95.4 432.4 l 94.9 432.6 l 94.5 432.9 l 94.2 433.1 l 93.8 433.4 l +93.4 433.7 l 93.1 433.9 l 92.7 434.2 l 92.4 434.6 l 92 434.9 l 91.7 435.2 l +91.4 435.6 l 91.1 435.9 l 90.8 436.3 l 90.6 436.7 l 90.3 437.1 l 90.1 437.5 l +89.8 437.9 l 89.6 438.3 l 89.4 438.7 l 89.2 439.2 l 89 439.6 l 88.8 440.1 l +88.7 440.5 l 88.5 441 l 88.4 441.5 l 88.3 442 l 88.2 442.4 l 88.1 442.9 l +88.1 443.4 l 88 443.9 l 88 444.4 l 88 444.9 l 88 445.5 l 88 446 l 88.1 446.5 l +88.1 447 l 88.2 447.5 l 88.3 447.9 l 88.4 448.4 l 88.5 448.9 l 88.7 449.4 l +88.8 449.8 l 89 450.3 l 89.2 450.7 l 89.4 451.2 l 89.6 451.6 l 89.8 452 l +90.1 452.4 l 90.3 452.8 l 90.6 453.2 l 90.8 453.6 l 91.1 453.9 l 91.4 454.3 l +91.7 454.7 l 92 455 l 92.4 455.3 l 92.7 455.6 l 93.1 456 l 93.4 456.2 l +93.8 456.5 l 94.2 456.8 l 94.5 457 l 94.9 457.3 l 95.4 457.5 l 95.8 457.7 l +96.2 457.9 l 96.6 458.1 l 97 458.2 l 97.5 458.4 l 97.9 458.5 l 98.4 458.6 l +98.8 458.7 l 99.3 458.8 l 99.8 458.9 l 100.3 458.9 l 100.7 458.9 l +101.2 458.9 l 101.7 458.9 l 102.2 458.9 l 102.6 458.9 l 103.1 458.8 l +103.6 458.7 l 104 458.6 l 104.5 458.5 l 104.9 458.4 l 105.4 458.2 l +105.8 458.1 l 106.2 457.9 l 106.7 457.7 l 107.1 457.5 l 107.5 457.3 l +107.9 457 l 108.3 456.8 l 108.7 456.5 l 109 456.2 l 109.4 456 l 109.7 455.6 l +110.1 455.3 l 110.4 455 l 110.7 454.7 l 111 454.3 l 111.3 453.9 l 111.6 453.6 l +111.9 453.2 l 112.1 452.8 l 112.4 452.4 l 112.6 452 l 112.8 451.6 l +113 451.2 l 113.2 450.7 l 113.4 450.3 l 113.6 449.8 l 113.8 449.4 l +113.9 448.9 l 114 448.4 l 114.1 447.9 l 114.2 447.5 l 114.3 447 l 114.3 446.5 l +114.4 446 l 114.4 445.5 l 114.4 444.9 l 114.4 444.4 l 114.4 443.9 l +114.3 443.4 l 114.3 442.9 l 114.2 442.4 l 114.1 442 l 114 441.5 l 113.9 441 l +113.8 440.5 l 113.6 440.1 l 113.4 439.6 l 113.2 439.2 l 113 438.7 l +112.8 438.3 l 112.6 437.9 l 112.4 437.5 l 112.1 437.1 l 111.9 436.7 l +111.6 436.3 l 111.3 435.9 l 111 435.6 l 110.7 435.2 l 110.4 434.9 l +110.1 434.6 l 109.7 434.2 l 109.4 433.9 l 109 433.7 l 108.7 433.4 l +108.3 433.1 l 107.9 432.9 l 107.5 432.6 l 107.1 432.4 l 106.7 432.2 l +106.2 432 l 105.8 431.8 l 105.4 431.7 l 104.9 431.5 l 104.5 431.4 l +104 431.3 l 103.6 431.2 l 103.1 431.1 l 102.6 431 l 102.2 431 l 101.7 431 l +101.2 430.9 l h +S +Q endstream +endobj + +2 0 obj + 24411 +endobj + +4 0 obj +<< /Type /Page + /Parent 3 0 R + /MediaBox [ 0 0 794 595 ] + /Contents 1 0 R +>> +endobj + +5 0 obj +<< /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman + /Encoding /WinAnsiEncoding +>> +endobj + +6 0 obj +<< /F1 5 0 R + >> +endobj + +7 0 obj +<< + /Font 6 0 R + /ProcSet [ /PDF ] +>> +endobj + +3 0 obj +<< /Type /Pages + /Resources 7 0 R + /MediaBox [ 0 0 595 842 ] + /Kids [ 4 0 R + ] + /Count 1 +>> +endobj + +8 0 obj +<< /Type /Catalog + /Pages 3 0 R +>> +endobj + +9 0 obj +<< /Author +/Creator +/Producer +/CreationDate (D:20060927094503-03'00') +>> +endobj + +xref +0 10 +0000000000 65535 f +0000000017 00000 n +0000024488 00000 n +0000024845 00000 n +0000024516 00000 n +0000024623 00000 n +0000024740 00000 n +0000024780 00000 n +0000024981 00000 n +0000025040 00000 n +trailer +<< /Size 10 + /Root 8 0 R + /Info 9 0 R +>> +startxref +25318 +%%EOF diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.png new file mode 100644 index 00000000000..e5ab8f31d88 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/collapse1.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/detail.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/detail.png new file mode 100644 index 00000000000..cb2188daa0d Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/detail.png differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.pdf b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.pdf new file mode 100644 index 00000000000..f8b34eae116 Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.pdf differ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.png b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.png new file mode 100644 index 00000000000..e643a381e4a Binary files /dev/null and b/Surface_mesh_simplification/doc/Surface_mesh_simplification/fig/general_collapse.png differ