rename Surface_modeling package to Surface_mesh_deformation for consistency
|
|
@ -177,7 +177,7 @@ the concepts provided by \cgal to implement a simple algorithm.
|
||||||
|
|
||||||
The following example program computes the minimum spanning tree on a surface mesh.
|
The following example program computes the minimum spanning tree on a surface mesh.
|
||||||
More examples can be found in the chapters
|
More examples can be found in the chapters
|
||||||
\ref PkgSurfaceMeshSimplificationSummary, \ref PkgSurfaceSegmentationSummary, and \ref PkgSurfaceModelingSummary.
|
\ref PkgSurfaceMeshSimplificationSummary, \ref PkgSurfaceSegmentationSummary, and \ref PkgSurfaceMeshDeformationSummary.
|
||||||
|
|
||||||
The surface mesh class uses integer indices to address vertices and edges,
|
The surface mesh class uses integer indices to address vertices and edges,
|
||||||
and it comes with a built-in property mechanism that maps nicely on the \sc{Bgl}.
|
and it comes with a built-in property mechanism that maps nicely on the \sc{Bgl}.
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@ Triangulation_2
|
||||||
Surface_mesh
|
Surface_mesh
|
||||||
Surface_mesh_simplification
|
Surface_mesh_simplification
|
||||||
Surface_mesh_segmentation
|
Surface_mesh_segmentation
|
||||||
Surface_modeling
|
Surface_mesh_deformation
|
||||||
Property_map
|
Property_map
|
||||||
Miscellany
|
Miscellany
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ Surface_reconstruction_points_3
|
||||||
Surface_mesh_segmentation
|
Surface_mesh_segmentation
|
||||||
Stream_lines_2
|
Stream_lines_2
|
||||||
Stream_support
|
Stream_support
|
||||||
Surface_modeling
|
Surface_mesh_deformation
|
||||||
Barycentric_coordinates_2
|
Barycentric_coordinates_2
|
||||||
Surface_mesh
|
Surface_mesh
|
||||||
Surface_mesh_shortest_path
|
Surface_mesh_shortest_path
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ h1 {
|
||||||
\package_listing{Subdivision_method_3}
|
\package_listing{Subdivision_method_3}
|
||||||
\package_listing{Surface_mesh_segmentation}
|
\package_listing{Surface_mesh_segmentation}
|
||||||
\package_listing{Surface_mesh_simplification}
|
\package_listing{Surface_mesh_simplification}
|
||||||
\package_listing{Surface_modeling}
|
\package_listing{Surface_mesh_deformation}
|
||||||
\package_listing{Surface_mesh_parameterization}
|
\package_listing{Surface_mesh_parameterization}
|
||||||
\package_listing{Surface_mesh_shortest_path}
|
\package_listing{Surface_mesh_shortest_path}
|
||||||
\package_listing{Surface_mesh_skeletonization}
|
\package_listing{Surface_mesh_skeletonization}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ pushd Arrangement_on_surface_2_Demo; zip ../arrangements_2.zip *;
|
||||||
pushd Periodic_2_triangulation_2_Demo; zip ../Periodic_2_Delaunay_triangulation_2.zip *;
|
pushd Periodic_2_triangulation_2_Demo; zip ../Periodic_2_Delaunay_triangulation_2.zip *;
|
||||||
popd
|
popd
|
||||||
# probably an error, in CGAL-4.5:
|
# probably an error, in CGAL-4.5:
|
||||||
rm -rf Surface_modeling_Demo
|
rm -rf Surface_mesh_deformation_Demo
|
||||||
|
|
||||||
# Demo not announced in the CGAL manual, from CGAL-3.8:
|
# Demo not announced in the CGAL manual, from CGAL-3.8:
|
||||||
rm -rf Circular_kernel_3_Demo
|
rm -rf Circular_kernel_3_Demo
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ Polyhedron
|
||||||
BGL
|
BGL
|
||||||
Solver_interface
|
Solver_interface
|
||||||
Surface_mesh
|
Surface_mesh
|
||||||
Surface_modeling
|
Surface_mesh_deformation
|
||||||
AABB_tree
|
AABB_tree
|
||||||
Triangulation_2
|
Triangulation_2
|
||||||
|
|
|
||||||
|
|
@ -258,9 +258,9 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||||
target_link_libraries(scene_polyhedron_shortest_path_item scene_polyhedron_item_decorator scene_polyhedron_item scene_polylines_item)
|
target_link_libraries(scene_polyhedron_shortest_path_item scene_polyhedron_item_decorator scene_polyhedron_item scene_polylines_item)
|
||||||
|
|
||||||
if(EIGEN3_FOUND )
|
if(EIGEN3_FOUND )
|
||||||
qt5_wrap_ui( editionUI_FILES Plugins/Surface_modeling/Deform_mesh.ui )
|
qt5_wrap_ui( editionUI_FILES Plugins/Surface_mesh_deformation/Deform_mesh.ui )
|
||||||
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp)
|
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp)
|
||||||
add_item(scene_edit_polyhedron_item Plugins/Surface_modeling/Scene_edit_polyhedron_item.cpp
|
add_item(scene_edit_polyhedron_item Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp
|
||||||
${editionUI_FILES})
|
${editionUI_FILES})
|
||||||
target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection)
|
target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ and \ref PkgJet_fitting_3. At that time, these packages were relying
|
||||||
on \sc{Taucs}, \sc{LAPACK}, \sc{BLAS} and \sc{OpenNL}. Gaël Guennebaud
|
on \sc{Taucs}, \sc{LAPACK}, \sc{BLAS} and \sc{OpenNL}. Gaël Guennebaud
|
||||||
then introduced new models using the \ref thirdpartyEigen library that
|
then introduced new models using the \ref thirdpartyEigen library that
|
||||||
became the only supported models by \cgal. Later on the packages \ref
|
became the only supported models by \cgal. Later on the packages \ref
|
||||||
PkgMeanCurvatureSkeleton3Summary and \ref PkgSurfaceModelingSummary
|
PkgMeanCurvatureSkeleton3Summary and \ref PkgSurfaceMeshDeformationSummary
|
||||||
extended the existing concepts.
|
extended the existing concepts.
|
||||||
|
|
||||||
Simon Giraudot was responsible for gathering all concepts and classes, and also wrote this user manual
|
Simon Giraudot was responsible for gathering all concepts and classes, and also wrote this user manual
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ Algebraic_foundations
|
||||||
Miscellany
|
Miscellany
|
||||||
Surface_mesh_parameterization
|
Surface_mesh_parameterization
|
||||||
Surface_mesh_skeletonization
|
Surface_mesh_skeletonization
|
||||||
Surface_modeling
|
Surface_mesh_deformation
|
||||||
Jet_fitting_3
|
Jet_fitting_3
|
||||||
Poisson_surface_reconstruction_3
|
Poisson_surface_reconstruction_3
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ as well as through the BGL API as described in the package \ref PkgBGLSummary,
|
||||||
as it is a model of the concepts `MutableFaceGraph` and `FaceListGraph`.
|
as it is a model of the concepts `MutableFaceGraph` and `FaceListGraph`.
|
||||||
Therefore it is possible to apply the algorithms of the packages
|
Therefore it is possible to apply the algorithms of the packages
|
||||||
\ref PkgSurfaceMeshSimplificationSummary,
|
\ref PkgSurfaceMeshSimplificationSummary,
|
||||||
\ref PkgSurfaceSegmentationSummary, and \ref PkgSurfaceModelingSummary on a surface mesh.
|
\ref PkgSurfaceSegmentationSummary, and \ref PkgSurfaceMeshDeformationSummary on a surface mesh.
|
||||||
|
|
||||||
|
|
||||||
\section sectionSurfaceMeshUsage Usage
|
\section sectionSurfaceMeshUsage Usage
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#define COMPUTE_V_AS_MATRIX
|
#define COMPUTE_V_AS_MATRIX
|
||||||
#define COMPUTE_U_AS_MATRIX
|
#define COMPUTE_U_AS_MATRIX
|
||||||
|
|
||||||
#include <CGAL/internal/Surface_modeling/auxiliary/Singular_Value_Decomposition_Preamble.hpp>
|
#include <CGAL/internal/Surface_mesh_deformation/auxiliary/Singular_Value_Decomposition_Preamble.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
|
|
@ -49,7 +49,7 @@ int main() {
|
||||||
for (int i = 0; i < ite; i++)
|
for (int i = 0; i < ite; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
#include <CGAL/internal/Surface_modeling/auxiliary/Singular_Value_Decomposition_Kernel_Declarations.hpp>
|
#include <CGAL/internal/Surface_mesh_deformation/auxiliary/Singular_Value_Decomposition_Kernel_Declarations.hpp>
|
||||||
|
|
||||||
ENABLE_SCALAR_IMPLEMENTATION(Sa11.f=m(0,0);)
|
ENABLE_SCALAR_IMPLEMENTATION(Sa11.f=m(0,0);)
|
||||||
ENABLE_SCALAR_IMPLEMENTATION(Sa21.f=m(1,0);)
|
ENABLE_SCALAR_IMPLEMENTATION(Sa21.f=m(1,0);)
|
||||||
|
|
@ -71,7 +71,7 @@ int main() {
|
||||||
ENABLE_SSE_IMPLEMENTATION(Va23=_mm_set1_ps(m(1,2));)
|
ENABLE_SSE_IMPLEMENTATION(Va23=_mm_set1_ps(m(1,2));)
|
||||||
ENABLE_SSE_IMPLEMENTATION(Va33=_mm_set1_ps(m(2,2));)
|
ENABLE_SSE_IMPLEMENTATION(Va33=_mm_set1_ps(m(2,2));)
|
||||||
|
|
||||||
#include <CGAL/internal/Surface_modeling/auxiliary/Singular_Value_Decomposition_Main_Kernel_Body.hpp>
|
#include <CGAL/internal/Surface_mesh_deformation/auxiliary/Singular_Value_Decomposition_Main_Kernel_Body.hpp>
|
||||||
|
|
||||||
std::pair<Eigen::Matrix3d, Eigen::Matrix3d> solver;
|
std::pair<Eigen::Matrix3d, Eigen::Matrix3d> solver;
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This is the CMake script for compiling a CGAL application.
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
|
|
||||||
project( Surface_modeling_demo )
|
project( Surface_mesh_deformation_demo )
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
if(POLICY CMP0043)
|
if(POLICY CMP0043)
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgSurfaceModelingConcepts
|
\ingroup PkgSurfaceMeshDeformationConcepts
|
||||||
\cgalConcept
|
\cgalConcept
|
||||||
|
|
||||||
@brief Concept describing the set of requirements for computing a 3x3 rotation matrix that is close to a given 3x3 matrix, together with basic computations used in the class `CGAL::Surface_mesh_deformation`.
|
@brief Concept describing the set of requirements for computing a 3x3 rotation matrix that is close to a given 3x3 matrix, together with basic computations used in the class `CGAL::Surface_mesh_deformation`.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/// \ingroup PkgSurfaceModelingConcepts
|
/// \ingroup PkgSurfaceMeshDeformationConcepts
|
||||||
/// \cgalConcept
|
/// \cgalConcept
|
||||||
///
|
///
|
||||||
/// Concept describing the set of requirements of a simple point type.
|
/// Concept describing the set of requirements of a simple point type.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/// \ingroup PkgSurfaceModelingConcepts
|
/// \ingroup PkgSurfaceMeshDeformationConcepts
|
||||||
/// \cgalConcept
|
/// \cgalConcept
|
||||||
///
|
///
|
||||||
/// @brief Concept describing the set of requirements for calculating weights for halfedges.
|
/// @brief Concept describing the set of requirements for calculating weights for halfedges.
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/// \cgalHeading{Example:}
|
/// \cgalHeading{Example:}
|
||||||
///
|
///
|
||||||
/// \code
|
/// \code
|
||||||
/// // a simple model to SurfaceModelingWeights concept, which provides uniform weights
|
/// // a simple model to SurfaceMeshDeformationWeights concept, which provides uniform weights
|
||||||
/// template <class HalfedgeGraph>
|
/// template <class HalfedgeGraph>
|
||||||
/// struct Identity_weight
|
/// struct Identity_weight
|
||||||
/// {
|
/// {
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
/// \endcode
|
/// \endcode
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
class SurfaceModelingWeights
|
class SurfaceMeshDeformationWeights
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \name Types
|
/// \name Types
|
||||||
|
|
@ -30,7 +30,7 @@ public:
|
||||||
/// \name Creation
|
/// \name Creation
|
||||||
/// @{
|
/// @{
|
||||||
/// Default constructor. Required only if the default parameter is used in the constructor of `CGAL::Surface_mesh_deformation`.
|
/// Default constructor. Required only if the default parameter is used in the constructor of `CGAL::Surface_mesh_deformation`.
|
||||||
SurfaceModelingWeights();
|
SurfaceMeshDeformationWeights();
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \name Operations
|
/// \name Operations
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
/// \defgroup PkgSurfaceModeling Triangulated Surface Mesh Deformation Reference
|
/// \defgroup PkgSurfaceMeshDeformation Triangulated Surface Mesh Deformation Reference
|
||||||
/// \defgroup PkgSurfaceModelingConcepts Concepts
|
/// \defgroup PkgSurfaceMeshDeformationConcepts Concepts
|
||||||
/// \ingroup PkgSurfaceModeling
|
/// \ingroup PkgSurfaceMeshDeformation
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\addtogroup PkgSurfaceModeling
|
\addtogroup PkgSurfaceMeshDeformation
|
||||||
\cgalPkgDescriptionBegin{Triangulated Surface Mesh Deformation,PkgSurfaceModelingSummary}
|
\cgalPkgDescriptionBegin{Triangulated Surface Mesh Deformation,PkgSurfaceMeshDeformationSummary}
|
||||||
\cgalPkgPicture{deform-ico.png}
|
\cgalPkgPicture{deform-ico.png}
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthor{Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz}
|
\cgalPkgAuthor{Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz}
|
||||||
\cgalPkgDesc{This package offers surface mesh deformation algorithms which provide new positions to the vertices of a surface mesh
|
\cgalPkgDesc{This package offers surface mesh deformation algorithms which provide new positions to the vertices of a surface mesh
|
||||||
under positional constraints of some of its vertices, without requiring any additional structure other than the surface mesh itself.}
|
under positional constraints of some of its vertices, without requiring any additional structure other than the surface mesh itself.}
|
||||||
\cgalPkgManuals{Chapter_SurfaceModeling,PkgSurfaceModeling}
|
\cgalPkgManuals{Chapter_SurfaceMeshDeformation,PkgSurfaceMeshDeformation}
|
||||||
\cgalPkgSummaryEnd
|
\cgalPkgSummaryEnd
|
||||||
\cgalPkgShortInfoBegin
|
\cgalPkgShortInfoBegin
|
||||||
\cgalPkgSince{4.5}
|
\cgalPkgSince{4.5}
|
||||||
|
|
@ -31,7 +31,7 @@ under positional constraints of some of its vertices, without requiring any addi
|
||||||
## Concepts ##
|
## Concepts ##
|
||||||
- `DeformationClosestRotationTraits_3`
|
- `DeformationClosestRotationTraits_3`
|
||||||
- `RawPoint_3`
|
- `RawPoint_3`
|
||||||
- `SurfaceModelingWeights`
|
- `SurfaceMeshDeformationWeights`
|
||||||
|
|
||||||
## Algebraic Traits ##
|
## Algebraic Traits ##
|
||||||
- `#CGAL::Deformation_Eigen_closest_rotation_traits_3`
|
- `#CGAL::Deformation_Eigen_closest_rotation_traits_3`
|
||||||
|
|
@ -2,7 +2,7 @@ namespace CGAL {
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
\mainpage User Manual
|
\mainpage User Manual
|
||||||
\anchor Chapter_SurfaceModeling
|
\anchor Chapter_SurfaceMeshDeformation
|
||||||
|
|
||||||
\cgalAutoToc
|
\cgalAutoToc
|
||||||
\authors Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz
|
\authors Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz
|
||||||
|
|
@ -10,7 +10,7 @@ namespace CGAL {
|
||||||
\image latex main_image_suggestion_4_resized.png
|
\image latex main_image_suggestion_4_resized.png
|
||||||
\image html main_image_suggestion_4_resized.png
|
\image html main_image_suggestion_4_resized.png
|
||||||
|
|
||||||
\section Surface_Modeling_Intro Introduction
|
\section SMD_Intro Introduction
|
||||||
This package offers surface mesh deformation algorithms which compute new vertex positions of a surface mesh
|
This package offers surface mesh deformation algorithms which compute new vertex positions of a surface mesh
|
||||||
under positional constraints of some of its vertices, without requiring any additional structure other than the surface mesh itself
|
under positional constraints of some of its vertices, without requiring any additional structure other than the surface mesh itself
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ alternative energy function \cgalCite{Chao2010SimpleGeomModel}.
|
||||||
The algorithm minimizes a nonlinear deformation energy under positional constraints to preserve rigidity as much as possible.
|
The algorithm minimizes a nonlinear deformation energy under positional constraints to preserve rigidity as much as possible.
|
||||||
The minimization of the energy relies on solving sparse linear systems and finding closest rotation matrices.
|
The minimization of the energy relies on solving sparse linear systems and finding closest rotation matrices.
|
||||||
|
|
||||||
\section Surface_Modeling_Def Definitions
|
\section SMD_Def Definitions
|
||||||
|
|
||||||
A <em>surface mesh deformation system</em> consists of:
|
A <em>surface mesh deformation system</em> consists of:
|
||||||
- a triangulated surface mesh (<em>surface mesh</em> in the following),
|
- a triangulated surface mesh (<em>surface mesh</em> in the following),
|
||||||
|
|
@ -46,7 +46,7 @@ convergence while the <em>ARAP</em> method requires the edge weights to be posit
|
||||||
the results obtained using the <em>Spokes and Rims</em> method are more dependent on the discretization
|
the results obtained using the <em>Spokes and Rims</em> method are more dependent on the discretization
|
||||||
of the deformed surface (See \cgalFigureRef{Arap_spokes_comparison}).
|
of the deformed surface (See \cgalFigureRef{Arap_spokes_comparison}).
|
||||||
|
|
||||||
More details on these algorithms are provided in section \ref Surface_Modeling_Overview.
|
More details on these algorithms are provided in section \ref SMD_Overview.
|
||||||
|
|
||||||
\cgalFigureBegin{Arap_spokes_comparison, arap_spokes_comparison.png}
|
\cgalFigureBegin{Arap_spokes_comparison, arap_spokes_comparison.png}
|
||||||
Comparison between the As-Rigid-As-Possible and the Spokes and Rims deformation methods.
|
Comparison between the As-Rigid-As-Possible and the Spokes and Rims deformation methods.
|
||||||
|
|
@ -57,7 +57,7 @@ latter method provides unconditional convergence does not produce a symmetric re
|
||||||
\cgalFigureEnd
|
\cgalFigureEnd
|
||||||
|
|
||||||
|
|
||||||
\section Surface_Modeling_API User Interface Description
|
\section SMD_API User Interface Description
|
||||||
|
|
||||||
The deformation methods implemented rely on solving a sparse linear system.
|
The deformation methods implemented rely on solving a sparse linear system.
|
||||||
The sparse matrix definition depends on the weighting scheme
|
The sparse matrix definition depends on the weighting scheme
|
||||||
|
|
@ -95,7 +95,7 @@ The function `Surface_mesh_deformation::preprocess()` returns `true` if the fact
|
||||||
|
|
||||||
Rank deficiency is the main reason for failure. Typical failure cases are:
|
Rank deficiency is the main reason for failure. Typical failure cases are:
|
||||||
- All the vertices are in the ROI and no control vertices are set
|
- All the vertices are in the ROI and no control vertices are set
|
||||||
- The weighting scheme used to fill the sparse matrix (model of `SurfaceModelingWeights`) features too many zeros and breaks the connectivity information
|
- The weighting scheme used to fill the sparse matrix (model of `SurfaceMeshDeformationWeights`) features too many zeros and breaks the connectivity information
|
||||||
|
|
||||||
\cgalAdvancedBegin
|
\cgalAdvancedBegin
|
||||||
The choice of the weighting scheme provides a mean to adjust the way the control vertices
|
The choice of the weighting scheme provides a mean to adjust the way the control vertices
|
||||||
|
|
@ -131,9 +131,9 @@ The original positions can be updated by calling `Surface_mesh_deformation::over
|
||||||
which will also require a new preprocessing step).
|
which will also require a new preprocessing step).
|
||||||
This behavior is illustrated in \ref SModelingVideo_1 "Video 1".
|
This behavior is illustrated in \ref SModelingVideo_1 "Video 1".
|
||||||
|
|
||||||
\subsection Surface_modeling_arap_or_spokes_and_rims As-Rigid-As-Possible and Spokes-and-Rims Deformation Techniques
|
\subsection Surface_mesh_deformation_arap_or_spokes_and_rims As-Rigid-As-Possible and Spokes-and-Rims Deformation Techniques
|
||||||
Two deformation techniques are provided by this package. This section summarizes from the user point of view what is
|
Two deformation techniques are provided by this package. This section summarizes from the user point of view what is
|
||||||
explained in details in the section \ref Surface_Modeling_Overview.
|
explained in details in the section \ref SMD_Overview.
|
||||||
|
|
||||||
The As-Rigid-As-Possible deformation technique requires the use of a positive weighting scheme to guarantee
|
The As-Rigid-As-Possible deformation technique requires the use of a positive weighting scheme to guarantee
|
||||||
the correct minimization of the energy. When using the default cotangent weighting scheme, this means that
|
the correct minimization of the energy. When using the default cotangent weighting scheme, this means that
|
||||||
|
|
@ -156,13 +156,13 @@ is guaranteed to always correctly minimize the energy even if the weights are ne
|
||||||
However, this technique is more dependent on the discretization of the deformed surface
|
However, this technique is more dependent on the discretization of the deformed surface
|
||||||
(See \cgalFigureRef{Arap_spokes_comparison}).
|
(See \cgalFigureRef{Arap_spokes_comparison}).
|
||||||
|
|
||||||
\subsection Surface_modeling_examples Examples
|
\subsection Surface_mesh_deformation_examples Examples
|
||||||
|
|
||||||
\subsubsection SModelingExample_1 Using the Whole Surface Mesh as Region-of-Interest
|
\subsubsection SModelingExample_1 Using the Whole Surface Mesh as Region-of-Interest
|
||||||
In this example, the whole surface mesh is used as ROI and a few vertices are added as control vertices.
|
In this example, the whole surface mesh is used as ROI and a few vertices are added as control vertices.
|
||||||
`Surface_mesh_deformation::set_target_position()` is used for setting the target positions of the control vertices.
|
`Surface_mesh_deformation::set_target_position()` is used for setting the target positions of the control vertices.
|
||||||
|
|
||||||
\cgalExample{Surface_modeling/all_roi_assign_example.cpp}
|
\cgalExample{Surface_mesh_deformation/all_roi_assign_example.cpp}
|
||||||
|
|
||||||
\cgalFigureBegin{SModelingExample_1_results, example_1_results.png}
|
\cgalFigureBegin{SModelingExample_1_results, example_1_results.png}
|
||||||
Deformation results when running example \ref SModelingExample_1 : `deform_1.off` and `deform_2.off`.
|
Deformation results when running example \ref SModelingExample_1 : `deform_1.off` and `deform_2.off`.
|
||||||
|
|
@ -172,7 +172,7 @@ Deformation results when running example \ref SModelingExample_1 : `deform_1.off
|
||||||
In this example, we use the functions `translate()` and `rotate()` on a range of control vertices.
|
In this example, we use the functions `translate()` and `rotate()` on a range of control vertices.
|
||||||
Note that the translations and the rotations are defined using a 3D vector type and a quaternion type from the \ref thirdpartyEigen "Eigen library".
|
Note that the translations and the rotations are defined using a 3D vector type and a quaternion type from the \ref thirdpartyEigen "Eigen library".
|
||||||
|
|
||||||
\cgalExample{Surface_modeling/k_ring_roi_translate_rotate_example.cpp}
|
\cgalExample{Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp}
|
||||||
|
|
||||||
\cgalFigureBegin{SModelingExample_2_results, example_2_results.png}
|
\cgalFigureBegin{SModelingExample_2_results, example_2_results.png}
|
||||||
Deformation results when running example \ref SModelingExample_2 : `deform_1.off` and `deform_2.off`.
|
Deformation results when running example \ref SModelingExample_2 : `deform_1.off` and `deform_2.off`.
|
||||||
|
|
@ -187,18 +187,18 @@ In the following example, we show how we can use alternative property maps.
|
||||||
For practical performance however we recommend relying upon
|
For practical performance however we recommend relying upon
|
||||||
the former examples instead, as using a `std::map`
|
the former examples instead, as using a `std::map`
|
||||||
to access indices increases the complexity from constant to logarithmic.
|
to access indices increases the complexity from constant to logarithmic.
|
||||||
\cgalExample{Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp}
|
\cgalExample{Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp}
|
||||||
|
|
||||||
\subsubsection SModelingExample_4 Using a Custom Edge Weighting Scheme
|
\subsubsection SModelingExample_4 Using a Custom Edge Weighting Scheme
|
||||||
Using a custom weighting scheme for edges is also possible if one provides a model of `SurfaceModelingWeights`.
|
Using a custom weighting scheme for edges is also possible if one provides a model of `SurfaceMeshDeformationWeights`.
|
||||||
In this example, the weight of each edge is pre-computed and an internal map is used for storing and accessing them.
|
In this example, the weight of each edge is pre-computed and an internal map is used for storing and accessing them.
|
||||||
|
|
||||||
|
|
||||||
Another example is given in the manual page of the concept `::SurfaceModelingWeights`.
|
Another example is given in the manual page of the concept `::SurfaceMeshDeformationWeights`.
|
||||||
|
|
||||||
\cgalExample{Surface_modeling/custom_weight_for_edges_example.cpp}
|
\cgalExample{Surface_mesh_deformation/custom_weight_for_edges_example.cpp}
|
||||||
|
|
||||||
\section Surface_Modeling_Demo How to Use the Demo
|
\section SMD_Demo How to Use the Demo
|
||||||
|
|
||||||
A plugin for the polyhedron demo is available to test the algorithm. The following video tutorials explain how to use it.
|
A plugin for the polyhedron demo is available to test the algorithm. The following video tutorials explain how to use it.
|
||||||
When the deformation dock window is open, the picking of control vertices and of the ROI is done by pressing <i>Shift</i>
|
When the deformation dock window is open, the picking of control vertices and of the ROI is done by pressing <i>Shift</i>
|
||||||
|
|
@ -232,14 +232,14 @@ more iteration steps are needed to reach the convergence.</div>
|
||||||
\endhtmlonly
|
\endhtmlonly
|
||||||
|
|
||||||
|
|
||||||
\section Surface_Modeling_Overview Deformation Techniques, Energies and Weighting Schemes
|
\section SMD_Overview Deformation Techniques, Energies and Weighting Schemes
|
||||||
This section gives the theoretical background to make the user manual self-contained
|
This section gives the theoretical background to make the user manual self-contained
|
||||||
and at the same time explains where the weights comes in. This allows advanced users
|
and at the same time explains where the weights comes in. This allows advanced users
|
||||||
of this package to tune the weighting scheme by developing a model of the concept
|
of this package to tune the weighting scheme by developing a model of the concept
|
||||||
`SurfaceModelingWeights` used in the class `Surface_mesh_deformation`.
|
`SurfaceMeshDeformationWeights` used in the class `Surface_mesh_deformation`.
|
||||||
|
|
||||||
\subsection Surface_Modeling_Overview_Preliminaries Preliminaries
|
\subsection SMD_Overview_Preliminaries Preliminaries
|
||||||
\subsubsection Surface_Modeling_Overview_Laplacian Laplacian Representation
|
\subsubsection SMD_Overview_Laplacian Laplacian Representation
|
||||||
The <em>Laplacian representation</em> (referred to as <em>Laplace coordinates</em> in \cgalCite{botsch2010polygon})
|
The <em>Laplacian representation</em> (referred to as <em>Laplace coordinates</em> in \cgalCite{botsch2010polygon})
|
||||||
of a vertex in a surface mesh is one way to <em>encode</em> the local neighborhood of a vertex in the surface mesh.
|
of a vertex in a surface mesh is one way to <em>encode</em> the local neighborhood of a vertex in the surface mesh.
|
||||||
In this representation, a vertex \f$ \mathbf{v}_i \f$ is associated a 3D vector defined as:
|
In this representation, a vertex \f$ \mathbf{v}_i \f$ is associated a 3D vector defined as:
|
||||||
|
|
@ -286,7 +286,7 @@ where:
|
||||||
- \f$\mathbf{V}\f$ is a \f$n \times 3\f$ matrix made of the %Cartesian coordinates of the vertices.
|
- \f$\mathbf{V}\f$ is a \f$n \times 3\f$ matrix made of the %Cartesian coordinates of the vertices.
|
||||||
|
|
||||||
|
|
||||||
\subsubsection Surface_Modeling_Overview_Laplacian_Deformation Laplacian Deformation
|
\subsubsection SMD_Overview_Laplacian_Deformation Laplacian Deformation
|
||||||
|
|
||||||
This section is an introduction to provide the background for the next two sub-sections describing the algorithms implemented
|
This section is an introduction to provide the background for the next two sub-sections describing the algorithms implemented
|
||||||
in this package. A system relying only on the approach described below results in non-smooth transitions in the neighborhood of
|
in this package. A system relying only on the approach described below results in non-smooth transitions in the neighborhood of
|
||||||
|
|
@ -332,7 +332,7 @@ The left-hand side matrix of the system of Eq.\f$\eqref{eq:lap_energy_system}\f$
|
||||||
solve the aforementioned system, an appropriate solver (e.g. LU solver) needs to be used. Note that solving this system
|
solve the aforementioned system, an appropriate solver (e.g. LU solver) needs to be used. Note that solving this system
|
||||||
preserves the Laplacian representation of the surface mesh restricted to the unconstrained vertices while satisfying the deformation constraints.
|
preserves the Laplacian representation of the surface mesh restricted to the unconstrained vertices while satisfying the deformation constraints.
|
||||||
|
|
||||||
\subsection Surface_Modeling_Overview_ARAP As-Rigid-As Possible Deformation
|
\subsection SMD_Overview_ARAP As-Rigid-As Possible Deformation
|
||||||
|
|
||||||
Given a surface mesh \f$M\f$ with \f$ n \f$ vertices \f$ \{\mathbf{v}_i\} i \in \{1 \dots n \} \f$ and some deformation
|
Given a surface mesh \f$M\f$ with \f$ n \f$ vertices \f$ \{\mathbf{v}_i\} i \in \{1 \dots n \} \f$ and some deformation
|
||||||
constraints, we consider the following energy function:
|
constraints, we consider the following energy function:
|
||||||
|
|
@ -432,7 +432,7 @@ by setting them to zero.
|
||||||
|
|
||||||
A method minimizing another energy function is described next to avoid the latter issue.
|
A method minimizing another energy function is described next to avoid the latter issue.
|
||||||
|
|
||||||
\subsection Surface_Modeling_Overview_ARAP_Rims Spokes and Rims Version
|
\subsection SMD_Overview_ARAP_Rims Spokes and Rims Version
|
||||||
|
|
||||||
The elastic energy function proposed by \cgalCite{Chao2010SimpleGeomModel} additionally takes into account
|
The elastic energy function proposed by \cgalCite{Chao2010SimpleGeomModel} additionally takes into account
|
||||||
all the opposite edges in the facets incident to a vertex. The energy function to minimize becomes:
|
all the opposite edges in the facets incident to a vertex. The energy function to minimize becomes:
|
||||||
|
|
@ -456,7 +456,7 @@ The vertices \f$ \mathbf{v}_n\f$ and \f$ \mathbf{v}_m\f$ are the opposite vertic
|
||||||
\cgalFigureEnd
|
\cgalFigureEnd
|
||||||
|
|
||||||
The method to get the new positions of the unconstrained vertices is similar to the two-step optimization
|
The method to get the new positions of the unconstrained vertices is similar to the two-step optimization
|
||||||
method explained in \ref Surface_Modeling_Overview_ARAP.
|
method explained in \ref SMD_Overview_ARAP.
|
||||||
For the first step, the Eq. \f$\eqref{eq:cov_matrix}\f$ is modified to take into account the edges in \f$E(\mathbf{v}_i)\f$:
|
For the first step, the Eq. \f$\eqref{eq:cov_matrix}\f$ is modified to take into account the edges in \f$E(\mathbf{v}_i)\f$:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
|
|
@ -483,14 +483,14 @@ where \f$\mathbf{R}_m\f$ and \f$\mathbf{R}_n\f$ are the rotation matrices of the
|
||||||
the boundary of the surface mesh, then \f$ w_{ij} \f$ must be 0 and \f$ \mathbf{v}_m
|
the boundary of the surface mesh, then \f$ w_{ij} \f$ must be 0 and \f$ \mathbf{v}_m
|
||||||
\f$ does not exist.
|
\f$ does not exist.
|
||||||
|
|
||||||
An important property of this approach compared to \ref Surface_Modeling_Overview_ARAP is that the contribution to the global energy
|
An important property of this approach compared to \ref SMD_Overview_ARAP is that the contribution to the global energy
|
||||||
of each vertex is guaranteed to be non-negative when using the cotangent weights \cgalCite{Chao2010SimpleGeomModel}.
|
of each vertex is guaranteed to be non-negative when using the cotangent weights \cgalCite{Chao2010SimpleGeomModel}.
|
||||||
Thus even with negative weights, the minimization of the energy with the iterative method presented is always guaranteed.
|
Thus even with negative weights, the minimization of the energy with the iterative method presented is always guaranteed.
|
||||||
However, this method is more dependent on the discretization of the deformed surface (See \cgalFigureRef{Arap_spokes_comparison}).
|
However, this method is more dependent on the discretization of the deformed surface (See \cgalFigureRef{Arap_spokes_comparison}).
|
||||||
|
|
||||||
The implementation in this package uses the cotangent weights by default (negative values included) as proposed in \cgalCite{Chao2010SimpleGeomModel}.
|
The implementation in this package uses the cotangent weights by default (negative values included) as proposed in \cgalCite{Chao2010SimpleGeomModel}.
|
||||||
|
|
||||||
\section Surface_Modeling_History Design and Implementation History
|
\section SMD_History Design and Implementation History
|
||||||
An initial version of this package has been implemented during the 2011 Google Summer of Code by Yin Xu under the guidance of Olga Sorkine and Andreas Fabri.
|
An initial version of this package has been implemented during the 2011 Google Summer of Code by Yin Xu under the guidance of Olga Sorkine and Andreas Fabri.
|
||||||
Ilker O. Yaz took over the finalization of the package with the help of Sébastien Loriot for the documentation and the API.
|
Ilker O. Yaz took over the finalization of the package with the help of Sébastien Loriot for the documentation and the API.
|
||||||
The authors are grateful to Gaël Guennebaud for his great help on using the Eigen library and for providing the code to compute
|
The authors are grateful to Gaël Guennebaud for his great help on using the Eigen library and for providing the code to compute
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
/*!
|
||||||
|
\example Surface_mesh_deformation/all_roi_assign_example.cpp
|
||||||
|
\example Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp
|
||||||
|
\example Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp
|
||||||
|
\example Surface_mesh_deformation/custom_weight_for_edges_example.cpp
|
||||||
|
*/
|
||||||
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 209 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
|
@ -2,7 +2,7 @@
|
||||||
# This is the CMake script for compiling a CGAL application.
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
|
|
||||||
project( Surface_modeling_ )
|
project( Surface_mesh_deformation_ )
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ typedef std::map<halfedge_descriptor, std::size_t> Internal_hedge_map;
|
||||||
typedef boost::associative_property_map<Internal_vertex_map> Vertex_index_map;
|
typedef boost::associative_property_map<Internal_vertex_map> Vertex_index_map;
|
||||||
typedef boost::associative_property_map<Internal_hedge_map> Hedge_index_map;
|
typedef boost::associative_property_map<Internal_hedge_map> Hedge_index_map;
|
||||||
|
|
||||||
// A model of SurfaceModelingWeights using a map of pre-computed weights
|
// A model of SurfaceMeshDeformationWeights using a map of pre-computed weights
|
||||||
struct Weights_from_map
|
struct Weights_from_map
|
||||||
{
|
{
|
||||||
typedef Polyhedron Halfedge_graph;
|
typedef Polyhedron Halfedge_graph;
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include <Eigen/SVD>
|
#include <Eigen/SVD>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
/// \ingroup PkgSurfaceModeling
|
/// \ingroup PkgSurfaceMeshDeformation
|
||||||
/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
|
/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
|
||||||
/// The internal computation relies on `Eigen::JacobiSVD<>` solver.
|
/// The internal computation relies on `Eigen::JacobiSVD<>` solver.
|
||||||
///
|
///
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#include <CGAL/Profile_counter.h>
|
#include <CGAL/Profile_counter.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
/// \ingroup PkgSurfaceModeling
|
/// \ingroup PkgSurfaceMeshDeformation
|
||||||
/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
|
/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
|
||||||
/// The internal computation relies on a hybrid system using the solvers `Eigen::SelfAdjointEigenSolver<>`
|
/// The internal computation relies on a hybrid system using the solvers `Eigen::SelfAdjointEigenSolver<>`
|
||||||
/// and `Eigen::JacobiSVD<>` (polar decomposition).
|
/// and `Eigen::JacobiSVD<>` (polar decomposition).
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/// \ingroup PkgSurfaceModeling
|
/// \ingroup PkgSurfaceMeshDeformation
|
||||||
///@brief Deformation algorithm type
|
///@brief Deformation algorithm type
|
||||||
enum Deformation_algorithm_tag
|
enum Deformation_algorithm_tag
|
||||||
{
|
{
|
||||||
|
|
@ -97,7 +97,7 @@ struct SC_on_the_fly_pmap: public Vertex_point_map{
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
///
|
///
|
||||||
/// \ingroup PkgSurfaceModeling
|
/// \ingroup PkgSurfaceMeshDeformation
|
||||||
/// @brief Class providing the functionalities for deforming a triangulated surface mesh
|
/// @brief Class providing the functionalities for deforming a triangulated surface mesh
|
||||||
///
|
///
|
||||||
/// @tparam HG a model of HalfedgeGraph
|
/// @tparam HG a model of HalfedgeGraph
|
||||||
|
|
@ -106,7 +106,7 @@ struct SC_on_the_fly_pmap: public Vertex_point_map{
|
||||||
/// @tparam HIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::halfedge_descriptor` as key and `unsigned int` as value type.
|
/// @tparam HIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::halfedge_descriptor` as key and `unsigned int` as value type.
|
||||||
/// The default is `boost::property_map<HG, boost::%halfedge_index_t>::%type`.
|
/// The default is `boost::property_map<HG, boost::%halfedge_index_t>::%type`.
|
||||||
/// @tparam TAG tag for selecting the deformation algorithm
|
/// @tparam TAG tag for selecting the deformation algorithm
|
||||||
/// @tparam WC a model of SurfaceModelingWeights, with `WC::Halfedge_graph` being `HG`.
|
/// @tparam WC a model of `SurfaceMeshDeformationWeights`, with `WC::Halfedge_graph` being `HG`.
|
||||||
/// If `TAG` is `ORIGINAL_ARAP`, the weights must be positive to guarantee a correct energy minimization.
|
/// If `TAG` is `ORIGINAL_ARAP`, the weights must be positive to guarantee a correct energy minimization.
|
||||||
/// The default is the cotangent weighting scheme. In case `TAG` is `ORIGINAL_ARAP`, negative weights are clamped to zero.
|
/// The default is the cotangent weighting scheme. In case `TAG` is `ORIGINAL_ARAP`, negative weights are clamped to zero.
|
||||||
/// @tparam ST a model of SparseLinearAlgebraWithFactorTraits_d. If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available
|
/// @tparam ST a model of SparseLinearAlgebraWithFactorTraits_d. If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This is the CMake script for compiling a CGAL application.
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
|
|
||||||
project( Surface_modeling_test )
|
project( Surface_mesh_deformation_test )
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Surface_modeling_test_commons.h"
|
#include "Surface_mesh_deformation_test_commons.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Surface_modeling_test_commons.h"
|
#include "Surface_mesh_deformation_test_commons.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Surface_modeling_test_commons.h"
|
#include "Surface_mesh_deformation_test_commons.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Surface_modeling_test_commons.h"
|
#include "Surface_mesh_deformation_test_commons.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||