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
Copy file name to clipboardExpand all lines: docs/source/tutorial/getting_started.rst
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,9 +358,9 @@ To enable the convergent formulation, we need to set ``use_convergent_formulatio
358
358
Technical Details
359
359
'''''''''''''''''
360
360
361
-
*We breifly summarize the convergent formulation here for convenience.*
361
+
*We briefly summarize the convergent formulation here for convenience.*
362
362
363
-
In order to derive a convergent formulation, we first define a continous form of our barrier potential :math:`P`. For a surface :math:`\mathcal{S}` embeded in 3D space, we parameterize the surfaces by common (possibly discontinuous) coordinates :math:`u \in\tilde{M} \subset\mathbb{R}^2`, so that :math:`\mathcal{S}(u)` traverses the material points across all surfaces contiguously. The total contact potential is then
363
+
In order to derive a convergent formulation, we first define a continuous form of our barrier potential :math:`P`. For a surface :math:`\mathcal{S}` embedded in 3D space, we parameterize the surfaces by common (possibly discontinuous) coordinates :math:`u \in\tilde{M} \subset\mathbb{R}^2`, so that :math:`\mathcal{S}(u)` traverses the material points across all surfaces contiguously. The total contact potential is then
@@ -372,7 +372,7 @@ where we define the operator :math:`\setminus_r: \mathcal{P}(\mathbb{R}^2) \time
372
372
373
373
with :math:`r \rightarrow0`.
374
374
375
-
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case we can parameterize the domain across all polylines with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
375
+
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case, we can parameterize the domain across all polylines with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
376
376
377
377
.. math::
378
378
\frac{1}{2} \int_{u \in\tilde{M}} \max_{t \in T \backslash p(u)} b(d(p(u), t), \hat{d})~\mathrm{d} u,
@@ -384,17 +384,17 @@ Applying mesh vertices as nodes (and quadrature points), we numerically integrat
where :math:`w_{\bar{x}}` are the quadrature weights, each given by onethird of the sum of the areas (in material space) of the boundary triangles incident to :math:`\bar{x}`.
387
+
where :math:`w_{\bar{x}}` are the quadrature weights, each given by one-third of the sum of the areas (in material space) of the boundary triangles incident to :math:`\bar{x}`.
388
388
389
-
We next need to smoothly approximate the max operator in the contact potentials. However, common approaches such as an :math:`L^p`-norm or LogSumExp would decrease sparsity in subsequent numerical solves by increasing stencil-size per contact evaluation. We instead leverage the locality of our barrier function to approximate the max operator by removing duplicate distance pairs. Our resulting approximators for a trianglated surfaces is
389
+
We next need to smoothly approximate the max operator in the contact potentials. However, common approaches such as an :math:`L^p`-norm or LogSumExp would decrease sparsity in subsequent numerical solves by increasing the stencilsize per contact evaluation. We instead leverage the locality of our barrier function to approximate the max operator by removing duplicate distance pairs. Our resulting approximators for a triangulated surface is
& \approx\max _{t \in T \backslash x} b(d(x, t), \hat{d}),
395
395
\end{aligned}
396
396
397
-
where :math:`V_{\text{int}} \subseteq V` is the subset of internal surface nodes and :math:`E_{\text{int}} \subseteq E` is the subset of internal surface edges (i.e., edges incident to two triangles). For locally convex regions this estimator is tight while remaining smooth. In turn, for nonconvex regions it improves over direct summation.
397
+
where :math:`V_{\text{int}} \subseteq V` is the subset of internal surface nodes and :math:`E_{\text{int}} \subseteq E` is the subset of internal surface edges (i.e., edges incident to two triangles). For locally convex regions this estimator is tight while remaining smooth. In turn, for nonconvex regions, it improves over direct summation.
398
398
399
399
The corresponding discrete barrier potential is then simply
400
400
@@ -408,7 +408,7 @@ The key difference between the original and the convergent formulations is that
408
408
Physical Barrier
409
409
''''''''''''''''
410
410
411
-
We want our barrier potential to have the same units of as our elastic potential (e.g., :math:`\text{J}`). Together with the area weighting (discussed above) this means the barrier should has units of pressure times distance (e.g., :math:`\text{Pa} \cdot\text{m}`). That is,
411
+
We want our barrier potential to have the same units as our elastic potential (e.g., :math:`\text{J}`). Together with the area weighting (discussed above), this means the barrier should have units of pressure times distance (e.g., :math:`\text{Pa} \cdot\text{m}`). That is,
@@ -433,7 +433,7 @@ The intention is to treat the barrier as a thin elastic region around the mesh,
433
433
Modeling Thickness
434
434
^^^^^^^^^^^^^^^^^^
435
435
436
-
We implement the thickness model of :cite:t:`Li2021CIPC` to apply an offset (refered to as :math:`\xi` in :cite:p:`Li2021CIPC` or :math:`d_\min` here) to the collision constraints. This is useful for modeling the thickness of a shell or cloth.
436
+
We implement the thickness model of :cite:t:`Li2021CIPC` to apply an offset (referred to as :math:`\xi` in :cite:p:`Li2021CIPC` or :math:`d_\min` here) to the collision constraints. This is useful for modeling the thickness of a shell or cloth.
437
437
438
438
To add a constraint offset, we need to set the ``dmin`` variable. For example, we can set the constraint offset :math:`d_\min=10^{-3}` and :math:`\hat{d}=10^{-4}`:
439
439
@@ -464,7 +464,7 @@ This will then set the ``dmin`` field in all of the ``CollisionConstraint`` obje
464
464
.. note::
465
465
Currently, only a single thickness value is supported for the entire mesh.
466
466
467
-
It is also important to set use the same :math:`d_\min` when performing CCD (see :ref:`Minimum Separation CCD <minimum-separation-ccd>`).
467
+
It is also important to use the same :math:`d_\min` when performing CCD (see :ref:`Minimum Separation CCD <minimum-separation-ccd>`).
468
468
469
469
Friction
470
470
--------
@@ -572,7 +572,7 @@ The choice of formulation is dependent on how the fixed set of ``contact_constra
572
572
Continuous Collision Detection
573
573
------------------------------
574
574
575
-
The last high-level component of the IPC Toolkit library is continuous collision detection (CCD). This is a method for determining if and at what time two objects will collide. This can be incorporated in a simulation nonlinear solver's line-search to determine the maximum step size allowable before a collision occurs.
575
+
The last high-level component of the IPC Toolkit library is continuous collision detection (CCD). This is a method for determining if and at what time two objects will collide. This can be incorporated in a simulation nonlinear solver's linesearch to determine the maximum step size allowable before a collision occurs.
576
576
577
577
There are two main functions for doing this: ``is_step_collision_free`` and ``compute_collision_free_stepsize``. The former returns a boolean value indicating if the step is collision-free, and the latter returns the maximum step size that is collision-free. Both functions take the same arguments, but ``compute_collision_free_stepsize`` is the more convenient function to use as it returns the maximum step size.
578
578
@@ -615,9 +615,9 @@ CCD is comprised of two parts (phases): broad-phase and narrow-phase.
615
615
Broad-Phase
616
616
^^^^^^^^^^^
617
617
618
-
The broad-phase takes all possible pairings (quadratic in size) and eliminates (culls) pairs whose bounding boxes do not overlap. This is done using a spatial data structure (e.g., a hash grid or spatial hash).
618
+
The broadphase takes all possible pairings (quadratic in size) and eliminates (culls) pairs whose bounding boxes do not overlap. This is done using a spatial data structure (e.g., a hash grid or spatial hash).
619
619
620
-
The ``Candidates`` class represents the culled set of candidate pairs and is built by using a broad-phase method. The following example shows how to use the broad-phase to determine the candidate pairs between the rest_positions and the squashed bunny.
620
+
The ``Candidates`` class represents the culled set of candidate pairs and is built by using a broad-phase method. The following example shows how to use the broadphase to determine the candidate pairs between the rest_positions and the squashed bunny.
621
621
622
622
.. md-tab-set::
623
623
@@ -647,9 +647,9 @@ Possible values for ``broad_phase_method`` are: ``BRUTE_FORCE`` (parallel brute
647
647
Narrow-Phase
648
648
^^^^^^^^^^^^
649
649
650
-
The narrow-phase computes the time of impact between two primitives (e.g., a point and a triangle or two edges in 3D). To do this we utilize the Tight Inclusion CCD method of :cite:t:`Wang2021TightInclusion` for the narrow-phase as it is provably conservative (i.e., never misses collisions), accurate (i.e., rarely reports false positives), and efficient.
650
+
The narrow-phase computes the time of impact between two primitives (e.g., a point and a triangle or two edges in 3D). To do this we utilize the Tight Inclusion CCD method of :cite:t:`Wang2021TightInclusion` for the narrowphase as it is provably conservative (i.e., never misses collisions), accurate (i.e., rarely reports false positives), and efficient.
651
651
652
-
The following example shows how to use the narrow-phase to determine if a point is colliding with a triangle (static in this case).
652
+
The following example shows how to use the narrowphase to determine if a point is colliding with a triangle (static in this case).
653
653
654
654
.. md-tab-set::
655
655
@@ -705,7 +705,7 @@ The following example shows how to use the narrow-phase to determine if a point
705
705
assert(is_colliding)
706
706
assert(abs(toi -0.5) <1e-8)
707
707
708
-
Alternatively, the ``FaceVertexCandidate`` class contains a ``ccd`` function that can be used to determine if the face-vertex pairing are colliding:
708
+
Alternatively, the ``FaceVertexCandidate`` class contains a ``ccd`` function that can be used to determine if the face-vertex pairing is colliding:
Copy file name to clipboardExpand all lines: docs/source/tutorial/misc.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Miscellaneous
4
4
Static Intersection Checks
5
5
--------------------------
6
6
7
-
Static intersection checks are not a core part of the IPC algorithm, but they are useful for debugging and verifying your input is intersectionfree. The IPC Toolkit provides a function for checking if a mesh is intersectionfree:
7
+
Static intersection checks are not a core part of the IPC algorithm, but they are useful for debugging and verifying your input is intersection-free. The IPC Toolkit provides a function for checking if a mesh is intersection-free:
Copy file name to clipboardExpand all lines: docs/source/tutorial/simulation.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ We provide several helper functions to make your job easier. The following examp
8
8
Volumetric Meshes
9
9
-----------------
10
10
11
-
The IPC Toolkit only handles surface meshes (through the ``CollisionMesh``). However, the finite element method often relies on volumetric discretizations. In this case the computed gradients and Hessians need to be mapped back to the full volumetric mesh. The ``CollisionMesh`` class provides this functionality.
11
+
The IPC Toolkit only handles surface meshes (through the ``CollisionMesh``). However, the finite element method often relies on volumetric discretizations. In this case, the computed gradients and Hessians need to be mapped back to the full volumetric mesh. The ``CollisionMesh`` class provides this functionality.
12
12
13
13
From the full (volumetric) mesh vertices and surface edges/faces which index into the full mesh vertices, you can build a ``CollisionMesh`` using the function ``CollisionMesh::build_from_full_mesh``. This will internally build and store a selection matrix that goes from the full to surface vertices as well as map the edge/faces entries accordingly.
14
14
@@ -80,7 +80,7 @@ This ``CollisionMesh`` can then be used just as any other ``CollisionMesh``. How
80
80
Nonlinear Bases and Curved Meshes
81
81
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
82
83
-
While IPC cannot directly handle nonlinear finite element bases and/or curved meshes, :cite:t:`Ferguson2023HighOrderIPC` show that displacements and forces can be transfered between a finite element mesh and a collision proxy through the use of a linear map. Given this linear map as a matrix, we can use the ``CollisionMesh`` class to map between the full and surface DOF.
83
+
While IPC cannot directly handle nonlinear finite element bases and/or curved meshes, :cite:t:`Ferguson2023HighOrderIPC` show that displacements and forces can be transferred between a finite element mesh and a collision proxy through the use of a linear map. Given this linear map as a matrix, we can use the ``CollisionMesh`` class to map between the full and surface DOF.
0 commit comments