Skip to content

Commit b3e6e02

Browse files
committed
Deploying to gh-pages from @ e62964b 🚀
1 parent baaa679 commit b3e6e02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3926
-86
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 855e77f81cab5221054e5971d635e63b
3+
config: 469400f8f2d47a57a5bcdf1ff6f7ccad
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_modules/index.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,30 @@
707707

708708

709709

710+
<li class="md-nav__item">
711+
<a href="../tutorials/gcp.html" class="md-nav__link">
712+
713+
714+
715+
<span class="md-ellipsis">
716+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
717+
718+
</span>
719+
720+
721+
</a>
722+
</li>
723+
724+
725+
726+
727+
728+
729+
730+
731+
732+
733+
710734
<li class="md-nav__item">
711735
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
712736

@@ -1888,7 +1912,7 @@ <h1>All modules for which code is available</h1>
18881912
<span class="md-icon" title="Last update">
18891913
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
18901914
</span>
1891-
Oct 30, 2025
1915+
Nov 10, 2025
18921916
</span>
18931917

18941918

_sources/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
tutorials/getting_started.rst
2222
tutorials/advanced_friction.rst
2323
tutorials/convergent.rst
24+
tutorials/gcp.rst
2425
tutorials/nonlinear_ccd.rst
2526
tutorials/adhesion.rst
2627
tutorials/simulation.rst

_sources/tutorials/gcp.rst.txt

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. _geometric-contact-potential-formulation:
2+
3+
Geometric Contact Potential
4+
======================
5+
6+
In addition to the original implementation of :cite:t:`Li2020IPC`, we also implement the Geometric Contact Potential (GCP) from :cite:t:`Huang2025GCP`.
7+
8+
GCP is implemented as separate collision and potential classes. A basic example of computing the GCP potential is as follows.
9+
10+
.. code-block:: c++
11+
12+
ipc::SmoothCollisions collisions;
13+
if (use_adaptive_dhat)
14+
collisions.compute_adaptive_dhat(collision_mesh, vertices, params);
15+
collisions.build(collision_mesh, vertices, params, use_adaptive_dhat);
16+
17+
ipc::SmoothContactPotential barrier_potential;
18+
double b = barrier_potential(collisions, mesh, vertices);
19+
20+
.. important::
21+
If `use_adaptive_dhat` is true, make sure to call `SmoothCollisions::compute_adaptive_dhat()` before `SmoothCollisions::build()`.
22+
23+
Technical Details
24+
-----------------
25+
26+
Similar to IPC, GCP potential has a distance barrier that converges to infinity as the distance converges to zero.
27+
28+
.. math::
29+
B(d; \hat{d}, p) := \frac{3}{2} B^3(\frac{2d}{\hat{d}}) d^{-p}
30+
31+
where :math:`\hat{d}` is the support size of the barrier function, :math:`p=d-1`, where :math:`d` is the dimension of the physics scene (2 or 3).
32+
33+
The main motivation of developing GCP is to eliminate the spurious collision forces in IPC when :math:`\hat{d}` is relatively large. The two important components to achieve this are *local minimum constraint* and *exterior direction constraint*. Please check out :cite:t:`Huang2025GCP` for more details, here we only give a high level idea.
34+
35+
The local minimum constraint is by noticing that the barrier potential is only necessary when the two primitives in a collision pair are the "distance local minima" on each surface they live. To achieve this, we consider the gradient of distance function along the tangent directions on the surface, and smoothly clamp the barrier to zero if the gradient of distance is positive along the tangent directions, since it suggests that there already exists a closer point on the surface that can trigger the barrier.
36+
37+
The exterior direction constraint is by noticing that, for a thin volumetric shell, the barrier potential is not needed for points on the opposite sides of the shell. To achieve this, we smoothly clamp the barrier based on the normal directions of two primitives in a collision pair. If the normal direction points to the opposite direction of the distance direction, we can skip this collision pair.
38+
39+
Both constraints not only reduces the number of collision pairs, but also increases the accuracy of collision handling by eliminating spurious forces that are non-physical, allowing wider range of :math:`\hat{d}` to be used in the simulation.
40+
41+
Parameter choices
42+
-----------------
43+
44+
Besides :math:`\hat{d}`, GCP also has other parameters to control the smoothness of local minimum and exterior direction constraints. For each constraint, there are :math:`\alpha` and :math:`\beta` to control the support region of the smooth Heaviside function (:math:`\alpha_t,\ \beta_t` for local minimum constraint, and :math:`\alpha_n,\ \beta_n` for exterior direction constraint). The smooth Heaviside function :math:`H(z;\alpha,\beta)\in C^1(\mathbb{R})` satisfies that
45+
46+
.. math::
47+
H(z;\alpha,\beta) = 0,\ \forall z < -\alpha \\
48+
H(z;\alpha,\beta) = 1,\ \forall z > \beta \\
49+
H'(z;\alpha,\beta) \geq 0,\ \forall z
50+
51+
Since :math:`H(z;\alpha,\beta)` takes the dot and cross products of unit vectors as inputs, we have :math:`-1\leq z\leq 1`. Thus, the basic requirement for parameters is:
52+
53+
.. math::
54+
0 \leq -\beta < \alpha \leq 1.
55+
56+
As :math:`\alpha + \beta` decreases, the support size of the Heaviside function reduces and the function becomes less smooth, thus, the overall potential becomes harder to optimize.
57+
58+
.. tip::
59+
For simplicity, we recommend to just use :math:`\beta_n = \beta_t = 0`. To make sure the potential landscape is smooth, the recommended parameter choices are :math:`\alpha_t\in [0.2, 0.9]`, :math:`\alpha_n = 0.1`.
60+
61+
Friction
62+
--------
63+
64+
We implement the original friction formulation of :cite:t:`Li2020IPC` following the same style, details are covered in the paper :cite:t:`Huang2025GCP`.

about/dependencies.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,30 @@
782782

783783

784784

785+
<li class="md-nav__item">
786+
<a href="../tutorials/gcp.html" class="md-nav__link">
787+
788+
789+
790+
<span class="md-ellipsis">
791+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
792+
793+
</span>
794+
795+
796+
</a>
797+
</li>
798+
799+
800+
801+
802+
803+
804+
805+
806+
807+
808+
785809
<li class="md-nav__item">
786810
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
787811

@@ -2144,7 +2168,7 @@ <h2 id="unit-test-dependencies">Unit Test Dependencies<a class="headerlink" href
21442168
<span class="md-icon" title="Last update">
21452169
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
21462170
</span>
2147-
Oct 30, 2025
2171+
Nov 10, 2025
21482172
</span>
21492173

21502174

about/license.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,30 @@
772772

773773

774774

775+
<li class="md-nav__item">
776+
<a href="../tutorials/gcp.html" class="md-nav__link">
777+
778+
779+
780+
<span class="md-ellipsis">
781+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
782+
783+
</span>
784+
785+
786+
</a>
787+
</li>
788+
789+
790+
791+
792+
793+
794+
795+
796+
797+
798+
775799
<li class="md-nav__item">
776800
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
777801

@@ -2015,7 +2039,7 @@ <h2 id="citation">Citation<a class="headerlink" href="#citation" title="Link to
20152039
<span class="md-icon" title="Last update">
20162040
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
20172041
</span>
2018-
Oct 30, 2025
2042+
Nov 10, 2025
20192043
</span>
20202044

20212045

about/release_notes.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,30 @@
21342134

21352135

21362136

2137+
<li class="md-nav__item">
2138+
<a href="../tutorials/gcp.html" class="md-nav__link">
2139+
2140+
2141+
2142+
<span class="md-ellipsis">
2143+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
2144+
2145+
</span>
2146+
2147+
2148+
</a>
2149+
</li>
2150+
2151+
2152+
2153+
2154+
2155+
2156+
2157+
2158+
2159+
2160+
21372161
<li class="md-nav__item">
21382162
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
21392163

@@ -5429,7 +5453,7 @@ <h4 id="changed-19"><span id="id89"></span>Changed<a class="headerlink" href="#c
54295453
<span class="md-icon" title="Last update">
54305454
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
54315455
</span>
5432-
Oct 30, 2025
5456+
Nov 10, 2025
54335457
</span>
54345458

54355459

build/c++.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,30 @@
792792

793793

794794

795+
<li class="md-nav__item">
796+
<a href="../tutorials/gcp.html" class="md-nav__link">
797+
798+
799+
800+
<span class="md-ellipsis">
801+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
802+
803+
</span>
804+
805+
806+
</a>
807+
</li>
808+
809+
810+
811+
812+
813+
814+
815+
816+
817+
818+
795819
<li class="md-nav__item">
796820
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
797821

@@ -2049,7 +2073,7 @@ <h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" tit
20492073
<span class="md-icon" title="Last update">
20502074
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
20512075
</span>
2052-
Oct 30, 2025
2076+
Nov 10, 2025
20532077
</span>
20542078

20552079

build/python.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,30 @@
808808

809809

810810

811+
<li class="md-nav__item">
812+
<a href="../tutorials/gcp.html" class="md-nav__link">
813+
814+
815+
816+
<span class="md-ellipsis">
817+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
818+
819+
</span>
820+
821+
822+
</a>
823+
</li>
824+
825+
826+
827+
828+
829+
830+
831+
832+
833+
834+
811835
<li class="md-nav__item">
812836
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
813837

@@ -2073,7 +2097,7 @@ <h2 id="help-documentation">Help/Documentation<a class="headerlink" href="#help-
20732097
<span class="md-icon" title="Last update">
20742098
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
20752099
</span>
2076-
Oct 30, 2025
2100+
Nov 10, 2025
20772101
</span>
20782102

20792103

cpp-api/adhesion.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,30 @@
718718

719719

720720

721+
<li class="md-nav__item">
722+
<a href="../tutorials/gcp.html" class="md-nav__link">
723+
724+
725+
726+
<span class="md-ellipsis">
727+
<span title="/tutorials/gcp.rst (reference label)"><span>Geometric Contact Potential</span></span>
728+
729+
</span>
730+
731+
732+
</a>
733+
</li>
734+
735+
736+
737+
738+
739+
740+
741+
742+
743+
744+
721745
<li class="md-nav__item">
722746
<a href="../tutorials/nonlinear_ccd.html" class="md-nav__link">
723747

@@ -4669,7 +4693,7 @@ <h2 id="tangential-adhesion-potential">Tangential Adhesion Potential<a class="he
46694693
<span class="md-icon" title="Last update">
46704694
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
46714695
</span>
4672-
Oct 30, 2025
4696+
Nov 10, 2025
46734697
</span>
46744698

46754699

0 commit comments

Comments
 (0)