diff --git a/.github/workflows/build-master.yml b/.github/workflows/build-master.yml index c6c2591ea0..ffc7defaf7 100644 --- a/.github/workflows/build-master.yml +++ b/.github/workflows/build-master.yml @@ -10,7 +10,7 @@ env: CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true CONFIG_LINUX: -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_FFTW3=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true CONFIG_MAC: -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true - CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true + CONFIG_WINDOWS: -DWITH_OPENMP=true #-DWITH_GMP=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true jobs: build: @@ -44,17 +44,18 @@ jobs: id: conan uses: turtlebrowser/get-conan@main with: - version: 1.57.0 + version: 2.4.0 - name: Create conan default profile if: matrix.os == 'windows-latest' - run: conan profile new default --detect - + run: | + conan profile detect --force + - uses: actions/cache@v4 if: matrix.os == 'windows-latest' with: path: ~/.conan - key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }} + key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }} - name: Get white list of tests run: | @@ -80,7 +81,9 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" + run: | + conan install $GITHUB_WORKSPACE --build=missing + cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" - name: Build working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/buildAndDocumentation-PR.yml b/.github/workflows/buildAndDocumentation-PR.yml index ed1a7d659f..a83e9c0891 100644 --- a/.github/workflows/buildAndDocumentation-PR.yml +++ b/.github/workflows/buildAndDocumentation-PR.yml @@ -6,12 +6,11 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)" CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true CONFIG_LINUX: -DUSE_CCACHE=NO -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true CONFIG_MAC: -DUSE_CCACHE=NO -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true - CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true + CONFIG_WINDOWS: -DWITH_OPENMP=true #-DWITH_GMP=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true jobs: build: @@ -45,17 +44,19 @@ jobs: id: conan uses: turtlebrowser/get-conan@main with: - version: 1.57.0 + version: 2.4.0 - name: Create conan default profile if: matrix.os == 'windows-latest' - run: conan profile new default --detect + run: | + conan profile detect --force + - uses: actions/cache@v4 if: matrix.os == 'windows-latest' with: - path: ~/.conan - key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }} + path: ~/.conan2 + key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }} - name: Get white list of tests run: | @@ -81,7 +82,9 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" + run: | + conan install $GITHUB_WORKSPACE --build=missing + cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" - name: Build working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/pythonBindings-PR.yml b/.github/workflows/pythonBindings-PR.yml index 011ffa6e15..9673759020 100644 --- a/.github/workflows/pythonBindings-PR.yml +++ b/.github/workflows/pythonBindings-PR.yml @@ -48,17 +48,18 @@ jobs: id: conan uses: turtlebrowser/get-conan@main with: - version: 1.57.0 + version: 2.4.0 - name: Install dependancies (conan - Windows 2/2) if: matrix.os == 'windows-latest' - run: conan profile new default --detect - + run: | + conan profile detect --force + - uses: actions/cache@v3 if: matrix.os == 'windows-latest' with: - path: ~/.conan - key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }} + path: ~/.conan2 + key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }} - name: Create Build Environment @@ -80,7 +81,9 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS + run: | + conan install $GITHUB_WORKSPACE --build=missing + cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS - name: Build diff --git a/.github/workflows/pythonBindings-Pypi.yml b/.github/workflows/pythonBindings-Pypi.yml index 56726a4be6..744bb47ed0 100644 --- a/.github/workflows/pythonBindings-Pypi.yml +++ b/.github/workflows/pythonBindings-Pypi.yml @@ -51,17 +51,19 @@ jobs: id: conan uses: turtlebrowser/get-conan@main with: - version: 1.57.0 + version: 2.4.0 - name: Install dependancies (conan - Windows 2/2) if: matrix.os == 'windows-latest' - run: conan profile new default --detect + run: | + conan profile new default --detect + conan install . --output-folder=build --build=missing - uses: actions/cache@v3 if: matrix.os == 'windows-latest' with: path: ~/.conan - key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }} + key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }} - name: Install python dependancies shell: bash diff --git a/ChangeLog.md b/ChangeLog.md index 0173bef613..12985a07a0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,13 +5,13 @@ - Major update: C++17 is now required for DGtal. (David Coeurjolly, [#1682](https://github.com/DGtal-team/DGtal/pull/1682)) - Mandatory dependencies and some optional ones can be setup by - conan.io, especially on windows, new `ENABLE_CONAN` cmake + conan.io, especially on Windows, new `ENABLE_CONAN` cmake option to activate this. (David Coeurjolly, [#1689](https://github.com/DGtal-team/DGtal/pull/1689)) - Faster build using CPM for dependency download and ccache with the cmake `USE_CCACHE=YES`option (ccache must be installed). (David Coeurjolly, [#1696](https://github.com/DGtal-team/DGtal/pull/1696)) - Better documentation style using doxygen-awesome.css. (David Coeurjolly, - [#1697](https://github.com/DGtal-team/DGtal/pull/1697)) + [#1697](https://github.com/DGtal-team/DGtal/pull/1697)) - *Geometry* - New implicit shape from point cloud using LibIGL Winding Numbers. (David Coeurjolly, @@ -23,6 +23,11 @@ [#1699](https://github.com/DGtal-team/DGtal/pull/1699)) - Python bindings and Pypi deploy are now handled by Github-Actions (Bastien Doignies, [#1721](https://github.com/DGtal-team/DGtal/pull/1721)) + - Add CMake option DGTAL_WRAP_PYTHON (Pablo Hernandez-Cerdan, + [#1700](https://github.com/DGtal-team/DGtal/pull/1700)) + - Upgrade of the conan scripts (for windows build) to conan 2, removing the ENABLE_CONAN option + (documentation update instead) (David Coeurjolly, + [#1729](https://github.com/DGtal-team/DGtal/pull/1729)) - *IO* - New method to change the mode of the light position in Viewer3D (fixed to @@ -30,11 +35,11 @@ - Add a new method to store material information in obj file in MeshReader and MeshWriter. (Bertrand Kerautret, [#1686](https://github.com/DGtal-team/DGtal/pull/1686)) - Fix duplicate symbols on Windows due to stb_image, see issue #1714 (David Coeurjolly, - [#1715](https://github.com/DGtal-team/DGtal/pull/1715) + [#1715](https://github.com/DGtal-team/DGtal/pull/1715)) - *Shapes* - - Add flips to SurfaceMesh data structure - (Jacques-Olivier Lachaud, [#1702](https://github.com/DGtal-team/DGtal/pull/1702)) + - Add flips to SurfaceMesh data structure (Jacques-Olivier Lachaud, + [#1702](https://github.com/DGtal-team/DGtal/pull/1702)) - Add method to remove isolated vertices in Mesh, improve obj material reading from potential obsolete path. (Bertrand Kerautret, [#1709](https://github.com/DGtal-team/DGtal/issues/1709)) @@ -43,6 +48,11 @@ - The WindingNumberShape class can output the raw winding number values (David Coeurjolly,[#1719](https://github.com/DGtal-team/DGtal/issues/1719)) +- *DEC* + - New helper functor to construct an embedder to correct the PolygonalCalculs + (projection onto estimated tangent planes) (David Coeurjolly, + [#1730](https://github.com/DGtal-team/DGtal/issues/17309)) + - *Geometry package* - Add creation of polytopes from segments and triangles in ConvexityHelper and 3-5xfaster full subconvexity tests for triangles diff --git a/README.md b/README.md index ab18ce7388..b826b96946 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ and to construct a federative project. Another objective of DGtal is to simplify the construction of demonstration tools to share new results and potential efficiency of the proposed work. +DGtal received the [Symposium on Geometry Processing Software Award in 2016](http://awards.geometryprocessing.org/). Quick Install ============= diff --git a/cmake/CheckDGtalDependencies.cmake b/cmake/CheckDGtalDependencies.cmake index 033f6aa3cc..7d8b74ae54 100644 --- a/cmake/CheckDGtalDependencies.cmake +++ b/cmake/CheckDGtalDependencies.cmake @@ -6,70 +6,6 @@ message(STATUS "---------------------------------------------------------------- message(STATUS "DGtal required dependencies: ") -# ----------------------------------------------------------------------------- -# Mandatory and optional deps via conan -# ----------------------------------------------------------------------------- -option(ENABLE_CONAN "Enable conan for deps discovery (used for windows CI for instance) features." OFF) - - -if (ENABLE_CONAN) - message(STATUS "Conan enabled for deps") - - if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") - message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") - file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake" - "${CMAKE_BINARY_DIR}/conan.cmake" - STATUS DOWNLOAD_STATUS - TLS_VERIFY ON) - list(GET DOWNLOAD_STATUS 0 STATUS_CODE) - list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE) - # Check if download was successful. - if(${STATUS_CODE} EQUAL 0) - message(STATUS "Download completed successfully!") - else() - message(STATUS "Error occurred during download: ${ERROR_MESSAGE}") - message(STATUS "Trying turning TLS_VERIFY OFF") - file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake" - "${CMAKE_BINARY_DIR}/conan.cmake" - STATUS DOWNLOAD_STATUS - TLS_VERIFY OFF) - list(GET DOWNLOAD_STATUS 0 STATUS_CODE) - list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE) - if(${STATUS_CODE} EQUAL 0) - message(STATUS "Download completed successfully!") - else() - message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}") - endif() - endif() - endif() - - include("${CMAKE_BINARY_DIR}/conan.cmake") - - conan_cmake_configure(REQUIRES zlib/1.2.13 - boost/1.81.0 - gmp/6.2.1 - fftw/3.3.9 - #cairo/1.17.6 - #libpng/1.6.39 #Explicit fix deps (compat issues) - #expat/2.5.0 - #openssl/1.1.1s - #libiconv/1.17 - OPTIONS boost:header_only=True - gmp:enable_cxx=True - GENERATORS cmake_find_package) - - conan_cmake_autodetect(settings) - conan_cmake_install(PATH_OR_REFERENCE . - BUILD missing - REMOTE conancenter - SETTINGS ${settings}) - - set(FFTW3_DIR ${CONAN_FFTW_ROOT}) - message(STATUS "Setting FFTW3_DIR to ${CONAN_FFTW_ROOT}") -else() - message(STATUS "Conan disabled") -endif() - # ----------------------------------------------------------------------------- # Looking for boost # ----------------------------------------------------------------------------- diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000000..7a96e48d16 --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,14 @@ +[requires] +fmt/9.1.0 +zlib/1.2.13 +boost/1.81.0 +gmp/6.3.0 +fftw/3.3.9 + +[generators] +CMakeDeps +CMakeToolchain + +[options] +boost*:header_only=True +gmp*:enable_cxx=True diff --git a/examples/polyscope-examples/dgtalCalculus-geodesic.cpp b/examples/polyscope-examples/dgtalCalculus-geodesic.cpp index d73a128176..c7df6f5ed9 100644 --- a/examples/polyscope-examples/dgtalCalculus-geodesic.cpp +++ b/examples/polyscope-examples/dgtalCalculus-geodesic.cpp @@ -93,25 +93,11 @@ void precompute() auto surfels = SH3::getSurfelRange( surface, params2 ); iinormals = SHG3::getIINormalVectors(binary_image, surfels,params2); trace.info()<addFaceVectorQuantity("II normals", iinormals); + calculus = new PolyCalculus(surfmesh); - calculus->setEmbedder( myProjEmbedder ); + functors::EmbedderFromNormalVectors embedderFromNormals(iinormals,surfmesh); + calculus->setEmbedder( embedderFromNormals ); } heat = new GeodesicsInHeat(calculus); diff --git a/src/DGtal/dec/PolygonalCalculus.h b/src/DGtal/dec/PolygonalCalculus.h index da8e62c74a..116a29d2ae 100644 --- a/src/DGtal/dec/PolygonalCalculus.h +++ b/src/DGtal/dec/PolygonalCalculus.h @@ -44,6 +44,64 @@ namespace DGtal { + namespace functors { + /** + * + * \brief Functor that projects a face vertex of a surface mesh onto the tangent plane + * given by a per-face normal vector. + * This functor can be used in PolygonalCalculus to correct the embedding of + * digital surfaces using an estimated normal vector field (see @cite coeurjolly2022simple). + * + * @note when used in PolygonalCalculus, all operators being invariant by translation, all + * tangent planes pass through the origin (0,0,0) (no offest). + * + * @tparam TRealPoint a model of points @f$\mathbb{R}^3@f$ (e.g. PointVector). + * @tparam TRealVector a model of vectors in @f$\mathbb{R}^3@f$ (e.g. PointVector). + */ template + struct EmbedderFromNormalVectors + { + ///Type of SurfaceMesh + typedef SurfaceMesh MySurfaceMesh; + ///Vertex type + typedef typename MySurfaceMesh::Vertex Vertex; + ///Face type + typedef typename MySurfaceMesh::Face Face; + ///Position type + typedef typename MySurfaceMesh::RealPoint Real3dPoint; + + EmbedderFromNormalVectors() = delete; + + /// Constructor from an array of normal vectors and a surface mesh instance. + /// @param normals a vector of per face normal vectors (same ordering as the SurfaceMesh face indicies). + /// @param surfmesh an instance of SurfaceMesh + EmbedderFromNormalVectors(ConstAlias> normals, + ConstAlias surfmesh) + { + myNormals = &normals; + mySurfaceMesh = &surfmesh; + } + + /// Project a face vertex onto its tangent plane (given by the per-face estimated + /// normal vector). + /// + /// @param f the face that contains the vertex + /// @param v the vertex to project + Real3dPoint operator()(const Face &f,const Vertex &v) + { + const auto nn = (*myNormals)[f]; + Real3dPoint p = mySurfaceMesh->position(v); + return p - nn.dot(p)*nn; + } + + ///Alias to the normal vectors + const std::vector *myNormals; + ///Alias to the surface mesh + const MySurfaceMesh *mySurfaceMesh; + }; + } + + + ///////////////////////////////////////////////////////////////////////////// // template class PolygonalCalculus /** @@ -223,7 +281,7 @@ class PolygonalCalculus { myEmbedder = externalFunctor; } - + /// @} // ----------------------- Per face operators -------------------------------------- //MARK: Per face operator on scalars diff --git a/src/DGtal/dec/doc/images/poly/corrected-with.png b/src/DGtal/dec/doc/images/poly/corrected-with.png new file mode 100644 index 0000000000..6ed6970488 Binary files /dev/null and b/src/DGtal/dec/doc/images/poly/corrected-with.png differ diff --git a/src/DGtal/dec/doc/images/poly/corrected-without.png b/src/DGtal/dec/doc/images/poly/corrected-without.png new file mode 100644 index 0000000000..4fe9ddffbc Binary files /dev/null and b/src/DGtal/dec/doc/images/poly/corrected-without.png differ diff --git a/src/DGtal/dec/doc/modulePolygonalCalculus.dox b/src/DGtal/dec/doc/modulePolygonalCalculus.dox index 93d9a48091..643ee65900 100644 --- a/src/DGtal/dec/doc/modulePolygonalCalculus.dox +++ b/src/DGtal/dec/doc/modulePolygonalCalculus.dox @@ -120,7 +120,11 @@ PolygonalCalculus::setEmbedder for an example. can have different embeddings for all its incident faces. + \subsection susub1 Basic operators + + + We first describe some standard per face operators. Note that for all extrinsic operators that require the vertex position in @f$ @@ -253,40 +257,75 @@ used when one solves a weak problem and wishes to get a pointwise per-vertex solution. -\section secLap Example: Solving a Laplace problem - -Let suppose we want to solve the following Laplace problem for data interpolation: -\f{eqnarray*}{ - \Delta_\Omega u& = 0 \\ - & s.t. u = g \text{ on } \partial\Omega -\f} - -We want to solve that problem on a polygonal mesh @f$\Omega@f$ -(digital surface here) with a boundary and some scalar values attached -to boundary vertices, or sampled on the object surface. - -Furthermore, the discrete version of the Laplace problem boils down to -a simple linear problem using on the discrete Laplace-Beltrami sparse -matrix. - -We also use class DirichletConditions to enforce Dirichlet boundary -conditions on the system. - -The overall code is: -\snippet dgtalCalculus-poisson.cpp PolyDEC-init - -Leading to the following results (see \ref dgtalCalculus-poisson.cpp): - -Surface | Boundary condition @f$ g@f$ | Solution @f$ u @f$ ---|--|-- -@image html images/poly/poisson-surf.png "" | @image html images/poly/poisson-g.png "" | @image html images/poly/poisson-u.png "" -@image html images/poly/bunny-init.png "" | @image html images/poly/bunny-g.png "" | @image html images/poly/bunny-u.png "" -@image html images/poly/cat-init.png "" | @image html images/poly/cat-g.png "" | @image html images/poly/cat-u.png "" + +\section sectCorrected Corrected Calculus using Estimated Normal Vectors + +On digital surfaces, solving PDE on original embedding with axis aligned quad surfaces may fail to correctly capture the surface metric. + As discussed in @cite coeurjolly2022simple, given an estimation of the tangent bundle of the discrete surface (for instance using + estimated normal vectors from @ref moduleIntegralInvariant, or @ref moduleVCM, cf @ref moduleShortcuts), + one can implicitly project each face to a prescribed tangent plane and perform the computations on this new embedding of the geometry. -\subsection Global Vector Calculus +Geodesic distances without correction | Geodesic distances with correction + --|-- +@image html images/poly/corrected-without.png "" | @image html images/poly/corrected-with.png "" -Global Vector Laplace/Poisson problems can also be solved by the same way, using instead PolygonalCalculus::globalConnectionLaplace() and PolygonalCalculus::doubledGlobalLumpedMassMatrix(). One can find examples of such use in the \ref VectorsInHeat class. + +The functor functors::EmbedderFromNormalVectors can be used to implicitly project Face vertices onto the prescribed tangent plane. A classical usage is the following one: + + @code + //A surface mesh. Eg. primal surface of a digital surface + SurfaceMesh< Z3i::RealPoint, Z3i::RealVector > surfmesh(...); + //Per face normal vector estimation + std::vector ii_normals = .... + + //New embedder using tangent plane projection of face vertices + functors::EmbedderFromNormalVectors embedderFromNormals(ii_normals,surfmesh); + + //The calculus instance with the new embedder + PolygonalCalculus calculus(surfmesh); + calculus->setEmbedder( embedderFromNormals ); + @endcode + A complete code is given in the @ref dgtalCalculus-geodesic.cpp example. + + \section secLap Example: Solving a Laplace problem + + Let suppose we want to solve the following Laplace problem for data interpolation: + \f{eqnarray*}{ + \Delta_\Omega u& = 0 \\ + & s.t. u = g \text{ on } \partial\Omega + \f} + + We want to solve that problem on a polygonal mesh @f$\Omega@f$ + (digital surface here) with a boundary and some scalar values attached + to boundary vertices, or sampled on the object surface. + + Furthermore, the discrete version of the Laplace problem boils down to + a simple linear problem using on the discrete Laplace-Beltrami sparse + matrix. + + We also use class DirichletConditions to enforce Dirichlet boundary + conditions on the system. + + The overall code is: + \snippet dgtalCalculus-poisson.cpp PolyDEC-init + + Leading to the following results (see \ref dgtalCalculus-poisson.cpp): + + Surface | Boundary condition @f$ g@f$ | Solution @f$ u @f$ + --|--|-- + @image html images/poly/poisson-surf.png "" | @image html images/poly/poisson-g.png "" | @image html images/poly/poisson-u.png "" + @image html images/poly/bunny-init.png "" | @image html images/poly/bunny-g.png "" | @image html images/poly/bunny-u.png "" + @image html images/poly/cat-init.png "" | @image html images/poly/cat-g.png "" | @image html images/poly/cat-u.png "" + + \subsection Global Vector Calculus + + Global Vector Laplace/Poisson problems can also be solved by the same way, using instead PolygonalCalculus::globalConnectionLaplace() and PolygonalCalculus::doubledGlobalLumpedMassMatrix(). One can find examples of such use in the \ref VectorsInHeat class. + + + + + \section sectMisc Miscellaneous \subsection sectPolygonalCalculusHP Cache mechanisms and high-performance computing @@ -325,7 +364,7 @@ Then, cached operators can be accessed and combined: auto Mf = cachefaceArea[f] * cacheU[f].transpose()*cacheU[f] + lambda * cacheP[f].transpose() * cacheP[f]; @endcode - + */ diff --git a/src/DGtal/doc/global.bib b/src/DGtal/doc/global.bib index a9d2262286..4cd8671e93 100644 --- a/src/DGtal/doc/global.bib +++ b/src/DGtal/doc/global.bib @@ -81,6 +81,14 @@ @inproceedings{nielson2003shrouds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% DEC/AT +@inproceedings{coeurjolly2022simple, + title = {A Simple Discrete Calculus for Digital Surfaces}, + author = {Coeurjolly, David and Lachaud, Jacques-Olivier}, + booktitle = {International Conference on Discrete Geometry and Mathematical Morphology}, + pages = {341--353}, + year = {2022}, + organization = {Springer} +} @article{ambrosio1990approximation, title={Approximation of functional depending on jumps by elliptic functional via t-convergence}, diff --git a/src/DGtal/doc/mainpage.dox b/src/DGtal/doc/mainpage.dox index 02413e601e..68dca15538 100644 --- a/src/DGtal/doc/mainpage.dox +++ b/src/DGtal/doc/mainpage.dox @@ -39,6 +39,8 @@ geometry community. It is still a work in progress but shows already many promises to be the common basis for future developments made by the digital geometry community. +DGtal received the [Symposium on Geometry Processing Software Award in 2016](http://awards.geometryprocessing.org/). + DGtal is associated with the projects [DGtalTools](http://dgtal.org/dgtaltools/) and [DGtalTools-contrib](http://dgtal.org/dgtaltools/). Please have a look diff --git a/src/DGtal/doc/moduleBuildDGtal.dox b/src/DGtal/doc/moduleBuildDGtal.dox index 15ea99ef2b..8043eea5b5 100644 --- a/src/DGtal/doc/moduleBuildDGtal.dox +++ b/src/DGtal/doc/moduleBuildDGtal.dox @@ -54,8 +54,14 @@ If you want to generate the documentation, you would need: @note Since 1.4, some dependencies could be installed using -[conan.io](https://conan.io). Just install the conan binary (1.57) and -cmake will install all libraries (which may take some time for the first build). +[conan.io](https://conan.io). Just install the conan 2 binary and +cmake will install all libraries (which may take some time for the first build). For instance: +``` +conan profile detect --force ##Conan profile +cd build +conan install .. --build=missing +cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW +``` \subsection linux Build on Linux-based distributions