You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/source/tutorial/simulation.rst
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,21 @@ While the IPC Toolkit provides all the principle components of the IPC algorithm
5
5
6
6
We provide several helper functions to make your job easier. The following examples show how to use these functions.
7
7
8
+
Optimization-Based Time Integration
9
+
-----------------------------------
10
+
11
+
IPC defines barrier potential :math:`B(\mathbf{x})` and a friction potential :math:`D(\mathbf{v})`. To add these into a optimization-based time integration, we need to scale the potentials by the time-integrators acceleration scaling. For implicit Euler, this is h^2, where h is the timestep.
12
+
13
+
With elasticity :math:`\Psi(\mathbf{x})`, the total optimization problem is:
where :math:`\hat{\mathbf{x}} = \mathbf{x}^t + h\mathbf{v}^t + h^2\mathbf{g}` is the time integration scheme-specific “predicted positions.”
19
+
20
+
.. note::
21
+
In \cite{Li2020}, all the constants are wrapped up into $\kappa$, which is adaptively modified. In follow-up works, we treat the barrier as a physical energy, and so it should have the same multiplier as the elastic energy ($h^2$ for implicit Euler).
/// @param max_iterations The maximum number of iterations to use for the CCD algorithm. If set to UNLIMITTED_ITERATIONS, the algorithm will run until it converges.
29
30
/// @param conservative_rescaling The conservative rescaling of the time of impact.
30
31
AdditiveCCD(
31
32
constlong max_iterations = UNLIMITTED_ITERATIONS,
@@ -39,7 +40,6 @@ class AdditiveCCD : public NarrowPhaseCCD {
39
40
/// @param[out] toi The time of impact between the two points.
40
41
/// @param min_distance The minimum distance between two objects.
41
42
/// @param tmax The maximum time to check for collisions.
42
-
/// @param conservative_rescaling The conservative rescaling of the time of impact.
43
43
/// @return True if a collision was detected, false otherwise.
44
44
boolpoint_point_ccd(
45
45
Eigen::ConstRef<VectorMax3d> p0_t0,
@@ -60,7 +60,6 @@ class AdditiveCCD : public NarrowPhaseCCD {
60
60
/// @param[out] toi The time of impact between the point and the edge.
61
61
/// @param min_distance The minimum distance between two objects.
62
62
/// @param tmax The maximum time to check for collisions.
63
-
/// @param conservative_rescaling The conservative rescaling of the time of impact.
64
63
/// @return True if a collision was detected, false otherwise.
65
64
boolpoint_edge_ccd(
66
65
Eigen::ConstRef<VectorMax3d> p_t0,
@@ -85,7 +84,6 @@ class AdditiveCCD : public NarrowPhaseCCD {
85
84
/// @param[out] toi The time of impact between the point and the triangle.
86
85
/// @param min_distance The minimum distance between two objects.
87
86
/// @param tmax The maximum time to check for collisions.
88
-
/// @param conservative_rescaling The conservative rescaling of the time of impact.
89
87
/// @return True if a collision was detected, false otherwise.
90
88
boolpoint_triangle_ccd(
91
89
Eigen::ConstRef<Eigen::Vector3d> p_t0,
@@ -112,7 +110,6 @@ class AdditiveCCD : public NarrowPhaseCCD {
112
110
/// @param[out] toi The time of impact between the two edges.
113
111
/// @param min_distance The minimum distance between two objects.
114
112
/// @param tmax The maximum time to check for collisions.
115
-
/// @param conservative_rescaling The conservative rescaling of the time of impact.
116
113
/// @return True if a collision was detected, false otherwise.
117
114
booledge_edge_ccd(
118
115
Eigen::ConstRef<Eigen::Vector3d> ea0_t0,
@@ -135,11 +132,13 @@ class AdditiveCCD : public NarrowPhaseCCD {
135
132
136
133
private:
137
134
/// @brief Computes the time of impact between two objects using additive continuous collision detection.
135
+
/// @param x Initial positions
136
+
/// @param dx Displacements
138
137
/// @param distance_squared A function that computes the squared distance between the two objects at a given time.
138
+
/// @param max_disp_mag The maximum displacement magnitude.
139
139
/// @param[out] toi The time of impact between the two objects.
140
140
/// @param min_distance The minimum distance between the objects.
141
141
/// @param tmax The maximum time to check for collisions.
142
-
/// @param conservative_rescaling The amount to rescale the objects by to ensure conservative advancement.
143
142
/// @return True if a collision was detected, false otherwise.
0 commit comments