|
1 | | -<p align="center"> |
2 | | -<a href="https://ipctk.xyz"><img alt="IPC Toolkit" src="docs/source/_static/logo.png" width="80%"></a> |
3 | | -</p> |
| 1 | +# [Siggraph 2025] Geometric Contact Potential |
4 | 2 |
|
5 | | -<p align="center"> |
6 | | -<a href="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml/badge.svg"></a> |
7 | | -<a href="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml/badge.svg"></a> |
8 | | -<a href="https://ipctk.xyz"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/docs.yml/badge.svg"></a> |
9 | | -<a href="https://codecov.io/github/ipc-sim/ipc-toolkit"><img src="https://codecov.io/github/ipc-sim/ipc-toolkit/graph/badge.svg?token=9BR6GPKRY8"/></a> |
10 | | -<a href="https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ipc-sim/ipc-toolkit.svg?color=blue"></a> |
11 | | -</p> |
| 3 | +<a href="https://github.com/geometryprocessing/GCP-toolkit/actions/workflows/continuous.yml"><img src="https://github.com/geometryprocessing/GCP-toolkit/actions/workflows/continuous.yml/badge.svg"></a> |
| 4 | +<a href="https://github.com/geometryprocessing/GCP-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/geometryprocessing/GCP-toolkit.svg?color=blue"></a> |
12 | 5 |
|
13 | | -## Description |
14 | | - |
15 | | -IPC Toolkit is a set of reusable functions to integrate Incremental Potential Contact (IPC) into a simulation. |
16 | | - |
17 | | -### Features |
18 | | - |
19 | | -* IPC barrier function and its derivatives and adaptive barrier stiffness algorithm |
20 | | -* Broad- and narrow-phase continuous collision detection (CCD) of linear and nonlinear trajectories |
21 | | -* Distance computation and derivatives between edges in 2D and triangles in 3D |
22 | | -* Distance barrier potential and its derivatives |
23 | | -* Smooth and lagged dissipative friction potential and its derivatives |
24 | | - |
25 | | -### Limitations |
26 | | - |
27 | | -This is not a full simulation library. As such it does not include any physics or solvers. For a full simulation implementation, we recommend [PolyFEM](https://polyfem.github.io/) (a finite element library) or [Rigid IPC](https://github.com/ipc-sim/rigid-ipc) (rigid-body dynamics) both of which utilize the IPC Toolkit. |
28 | | - |
29 | | -<!--- BEGIN C++ README 1 ---> |
30 | | - |
31 | | -## Build |
32 | | - |
33 | | -The easiest way to add the toolkit to an existing CMake project is to download it through CMake. |
34 | | -CMake provides functionality for doing this called [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) (requires CMake ≥ 3.14). |
35 | | -We use a very similar process to download all external dependencies (using [CPM](https://github.com/cpm-cmake/CPM.cmake)). |
| 6 | + |
36 | 7 |
|
37 | | -For example, |
38 | | - |
39 | | -```cmake |
40 | | -include(FetchContent) |
41 | | -FetchContent_Declare( |
42 | | - ipc_toolkit |
43 | | - GIT_REPOSITORY https://github.com/ipc-sim/ipc-toolkit.git |
44 | | - GIT_TAG ${IPC_TOOLKIT_GIT_TAG} |
45 | | -) |
46 | | -FetchContent_MakeAvailable(ipc_toolkit) |
47 | | -``` |
48 | | - |
49 | | -where `IPC_TOOLKIT_GIT_TAG` is set to the version of the toolkit you want to use. This will download and add the toolkit to CMake. The toolkit can then be linked against using |
50 | | - |
51 | | -```cmake |
52 | | -# Link against the IPC Toolkit |
53 | | -target_link_libraries(${PROJECT_NAME} PUBLIC ipc::toolkit) |
54 | | -``` |
55 | | - |
56 | | -where `PROJECT_NAME` is the name of your library/binary. |
57 | | - |
58 | | -<!--- BEGIN C++ README 2 ---> |
59 | | - |
60 | | -### Dependencies |
| 8 | +## Description |
61 | 9 |
|
62 | | -**All required dependencies are downloaded through CMake** depending on the build options. |
| 10 | +GCP toolkit is a set of reusable functions to integrate [Geometric Contact Potential](https://huangzizhou.github.io/research/smooth-contact.html) (GCP) into a simulation, built on top of the [IPC toolkit](https://github.com/ipc-sim/ipc-toolkit). |
63 | 11 |
|
64 | | -The following libraries are used in this project: |
| 12 | +## Features |
65 | 13 |
|
66 | | -* [Eigen](https://eigen.tuxfamily.org/): linear algebra |
67 | | -* [libigl](https://github.com/libigl/libigl): basic geometry functions and predicates |
68 | | -* [oneTBB](https://github.com/oneapi-src/oneTBB): parallelism |
69 | | -* [Tight-Inclusion](https://github.com/Continuous-Collision-Detection/Tight-Inclusion): provably conservative CCD of [Wang and Ferguson et al. 2021] |
70 | | -* [SimpleBVH](https://github.com/ipc-sim/SimpleBVH): a simple bounding volume hierarchy data structure |
71 | | -* [Scalable-CCD](https://github.com/Continuous-Collision-Detection/Scalable-CCD): scalable (GPU) CCD of [Belgrod et al. 2023] |
72 | | -* [spdlog](https://github.com/gabime/spdlog): logging information |
| 14 | +[Geometric Contact Potential](https://huangzizhou.github.io/research/smooth-contact.html) introduces a new type of barrier-based collision model, with the following features different from IPC: |
73 | 15 |
|
74 | | -#### Optional |
| 16 | +* **Large $\hat{d}$ allowed**: In IPC, if $\hat{d}$ is larger than any edge length, spurious contact forces would push neighboring vertices apart, which does not happen to GCP. |
| 17 | +* **Convergence under refinement**: The GCP potential is derived from a continuous formulation, and the discretized potential converges to the continuous version under mesh refinement. |
| 18 | +* **No spurious forces**: GCP elliminates the spurious forces of IPC in various cases (check the paper for details) by considering the local normal and tangent directions. |
75 | 19 |
|
76 | | -The following dependencies are optionally used based on CMake options: |
| 20 | +## Limitations |
77 | 21 |
|
78 | | -* [robin-map](https://github.com/Tessil/robin-map): faster hash set/map than `std::unordered_set`/`std::unordered_map` |
79 | | - * Enable by using the CMake option `IPC_TOOLKIT_WITH_ROBIN_MAP` |
80 | | - * Enabled by default |
81 | | -* [Abseil](https://abseil.io/): hashing utilities |
82 | | - * Enable by using the CMake option `IPC_TOOLKIT_WITH_ABSEIL` |
83 | | - * Enabled by default |
84 | | -* [filib](https://github.com/zfergus/filib): interval arithmetic for nonlinear trajectories/CCD |
85 | | - * Enable by using the CMake option `IPC_TOOLKIT_WITH_FILIB` |
86 | | - * Enabled by default |
87 | | -* [rational-cpp](https://github.io/zfergus/rational-cpp): rational arithmetic used for exact intersection checks |
88 | | - * Enable by using the CMake option `IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION` |
89 | | - * Requires [GMP](https://gmplib.org/) to be installed at a system level |
90 | | -* [Etienne Vouga's Collision Detection Library](https://github.com/evouga/collisiondetection): inexact CCD |
91 | | - * Included for comparison with the original IPC library |
92 | | - * Enable by using the CMake option `IPC_TOOLKIT_WITH_INEXACT_CCD` |
93 | | - * Replaces the default Tight-Inclusion CCD |
| 22 | +This is not a full simulation library. As such it does not include any physics or solvers. A full simulation implementation in [PolyFEM](https://polyfem.github.io) is available [here](https://github.com/geometryprocessing/geometric-contact-potential). |
94 | 23 |
|
95 | 24 | ## Usage |
96 | 25 |
|
97 | | -See the [tutorial](https://ipctk.xyz/tutorial/getting_started.html) for a quick introduction to the toolkit, or the [documentation](https://ipctk.xyz/cpp.html) for a full reference. |
98 | | - |
99 | | -## Unit Tests |
100 | | - |
101 | | -We provide unit tests to ensure the correctness of our algorithmic pieces. |
102 | | -To enable the unit tests use the CMake option `IPC_TOOLKIT_BUILD_TESTS`. |
103 | | - |
104 | | -### Dependencies |
105 | | - |
106 | | -The following are downloaded when unit tests are enabled: |
107 | | - |
108 | | -* [Catch2](https://github.com/catchorg/Catch2.git): testing framework |
109 | | -* [finite-diff](https://github.com/zfergus/finite-diff): finite-difference comparisons |
110 | | -* [Nlohman's JSON library](https://github.com/nlohmann/json): loading test data from JSON files |
111 | | - |
112 | | -<!--- END C++ README ---> |
113 | | - |
114 | | -## Python Bindings |
115 | | - |
116 | | -We provide Python bindings for functions in the toolkit using [pybind11](https://github.com/pybind/pybind11). |
117 | | - |
118 | | -For more information see the [Python documentation](https://ipctk.xyz/python.html). |
119 | | - |
120 | | -## Contributing |
121 | | - |
122 | | -This project is open to contributors! Contributions can come in the form of feature requests, bug fixes, documentation, tutorials, and the like. We highly recommend filing an Issue first before submitting a Pull Request. |
123 | | - |
124 | | -Simply fork this repository and make a Pull Request! We would appreciate: |
125 | | - |
126 | | -* Implementation of new features |
127 | | -* Bug Reports |
128 | | -* Documentation |
129 | | -* Testing |
130 | | - |
131 | | -## Citation |
132 | | - |
133 | | -If you use the IPC Toolkit in your project, please consider citing our work: |
134 | | - |
135 | | -```bibtex |
136 | | -@software{ipc_toolkit, |
137 | | - author = {Zachary Ferguson and others}, |
138 | | - title = {{IPC Toolkit}}, |
139 | | - url = {https://github.com/ipc-sim/ipc-toolkit}, |
140 | | - year = {2020}, |
141 | | -} |
142 | | -``` |
143 | | - |
144 | | -Additionally, you can cite the original IPC paper: |
145 | | - |
146 | | -```bibtex |
147 | | -@article{Li2020IPC, |
148 | | - author = {Minchen Li and Zachary Ferguson and Teseo Schneider and Timothy Langlois and |
149 | | - Denis Zorin and Daniele Panozzo and Chenfanfu Jiang and Danny M. Kaufman}, |
150 | | - title = {Incremental Potential Contact: Intersection- and Inversion-free Large Deformation Dynamics}, |
151 | | - journal = {{ACM} Trans. Graph. (SIGGRAPH)}, |
152 | | - year = {2020}, |
153 | | - volume = {39}, |
154 | | - number = {4}, |
155 | | - articleno = {49} |
156 | | -} |
157 | | -``` |
158 | | - |
159 | | -## License |
| 26 | +[Geometric Contact Potential](https://huangzizhou.github.io/research/smooth-contact.html) differs from IPC only in the potential formulation. It reuses existing utilities in IPC toolkit to collect collision candidates, perform narrow phase CCD, etc. Below shows a table of GCP classes with their IPC counterparts. |
160 | 27 |
|
161 | | -MIT License © 2020, the IPC-Sim organization (See <a href="https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE"><code>LICENSE</code></a> for details). |
| 28 | +| GCP | IPC | Description | |
| 29 | +| ----- | ------ | ----- | |
| 30 | +| SmoothCollision | Collision | Base class of various collision pair type | |
| 31 | +| SmoothCollisionTemplate | EdgeEdgeCollision, FaceVertexCollision, etc. | Specific collision pair type | |
| 32 | +| SmoothCollisionsBuilder | CollisionsBuilder | To construct collision pairs from collision candidates | |
| 33 | +| SmoothCollisions | Collisions | Collection of all collision pairs | |
| 34 | +| SmoothContactPotential | BarrierPotential | Collision potential | |
0 commit comments