Skip to content
← All articles
Project introduction

IPC Toolkit: collision and friction inside a simulation

Listen to the audio story

The contact engine inside a simulation · 2:10 · AI-written script, synthetic voices

Transcript

Ava: Imagine a simulation where two surfaces slide against each other, and the program has to know exactly when they touch and how much they resist. Someone has to do that math. In many projects, it's IPC Toolkit.

Andrew: So it's a physics engine?

Ava: Not a full one. It's a C plus plus library focused only on contact. Your application keeps the time-stepping loop and the solver, and calls the library whenever it needs contact answers.

Andrew: Like a specialist you phone for one hard question.

Ava: That's a good picture. The simulation passes in collision geometry and how the vertices move. The library first picks candidate pairs in a broad phase, then checks them precisely with continuous collision detection, and hands the result back.

Andrew: What does it compute?

Ava: Four families. Collision detection, in broad and narrow phases. Distance derivatives for edges and triangles. Contact barriers, meaning functions that keep surfaces from passing through each other, including adaptive stiffness. And friction potentials, smooth or lagged.

Andrew: And what's Antoine's part in it?

Ava: He contributes to it as open source. His fork is where he stages changes before proposing them to the upstream project. One merged contribution adds anisotropic friction, where grip depends on direction. Another merged one lets you pass parameters to the Scalable CCD narrow phase.

Andrew: Anything beyond friction?

Ava: He also drafted adhesion documentation that was merged, and fixed a Windows CUDA build issue in the Scalable CCD project, the GPU collision detection path.

Andrew: Is there a common thread?

Ava: Yes. Friction that depends on direction and material pair, which is exactly what his thesis work on surface wear needed from the contact model. Plus the GPU collision path, which the Windows build and parameter pass-through opened up.

Andrew: So the library and his research feed each other.

Ava: Exactly. If you want to see complete simulations using it, the upstream project points to PolyFEM and Rigid IPC. The full write-up has the architecture diagram and the list of pull requests.

Table of contents

IPC Toolkit is a C++ library for contact calculations. It provides collision detection, distance derivatives and friction potentials. The application supplies the time-stepping loop and solver.

1. Where it fits

A simulation passes collision geometry and vertex motion to the contact library. The diagram follows that query through broad-phase candidates and narrow-phase continuous collision detection (CCD), then back to the application.

Contact query flow from an external simulation through broad-phase candidates and narrow-phase continuous collision detection to the result

A contact query starts and ends in the calling simulation. Time stepping and solving remain the application’s responsibility.

2. What it computes

The routines cover several parts of contact handling:

AreaAvailable calculations
Collision detectionBroad- and narrow-phase continuous collision detection.
DistanceDistance derivatives for edges and triangles.
Contact barriersBarrier functions and derivatives, distance barrier potentials, and adaptive barrier stiffness.
FrictionSmooth or lagged dissipative friction potentials.

IPC Toolkit is not a complete physics engine. The upstream project points to PolyFEM and Rigid IPC as complete simulation implementations that use the library.

3. My contributions

The fork at antoinebou12/ipc-toolkit[1] is where I stage changes before proposing them upstream. The pull requests below are the public record (GitHub, retrieved 2026-11-05); status is as GitHub reports it.

Pull requestOpenedStatus
ipc-sim/ipc-toolkit #210 — Anisotropic friction[2]2026-02Merged 2026-04-16
ipc-sim/ipc-toolkit #208 — Option to pass parameters to the Scalable CCD narrow phase[3]2026-01Merged 2026-01-26
ipc-sim/ipc-toolkit #144 — Draft adhesion documentation[4]2024-11Merged 2024-12-11
ipc-sim/ipc-toolkit #139 — Static and kinetic coefficients in the tangential collision force[5]2024-11Closed without merge
ipc-sim/ipc-toolkit #128 — Pairwise kinetic and static friction for different materials[6]2024-11Closed without merge
Continuous-Collision-Detection/Scalable-CCD #5 — Remove -fpic for the Windows CUDA build (vcpkg)[7]2024-09Merged 2024-09-27
Continuous-Collision-Detection/Scalable-CCD #6 — Multiple CUDA version tests[8]2024-09Closed without merge

Two staging pull requests remain open on the fork: #3 — extract tolerance and max iterations from TightInclusionCCD for GPU CCD[9] and #4 — anisotropic friction[10], the branch behind upstream #210.

The thread through these changes is friction that depends on direction and material pair, which is what my thesis work on surface wear needed from the contact model, plus the GPU continuous-collision-detection path (Scalable CCD) that the Windows build and the parameter pass-through unblocked.

4. Read the code and build instructions

The project documentation covers the repository structure. Use the upstream README[11] for build instructions and the contributor fork[1] for changes in that fork.

References

  1. antoinebou12. (). ipc-toolkit. [Software repository] github.com.
  2. ipc-sim. (). ipc-sim/ipc-toolkit #210 — Anisotropic friction. [Source file or documentation] github.com.
  3. ipc-sim. (). ipc-sim/ipc-toolkit #208 — Option to pass parameters to the Scalable CCD narrow phase. [Source file or documentation] github.com.
  4. ipc-sim. (). ipc-sim/ipc-toolkit #144 — Draft adhesion documentation. [Source file or documentation] github.com.
  5. ipc-sim. (). ipc-sim/ipc-toolkit #139 — Static and kinetic coefficients in the tangential collision force. [Source file or documentation] github.com.
  6. ipc-sim. (). ipc-sim/ipc-toolkit #128 — Pairwise kinetic and static friction for different materials. [Source file or documentation] github.com.
  7. Continuous-Collision-Detection. (). Continuous-Collision-Detection/Scalable-CCD #5 — Remove -fpic for the Windows CUDA build (vcpkg). [Source file or documentation] github.com.
  8. Continuous-Collision-Detection. (). Continuous-Collision-Detection/Scalable-CCD #6 — Multiple CUDA version tests. [Source file or documentation] github.com.
  9. antoinebou12. (). #3 — extract tolerance and max iterations from TightInclusionCCD for GPU CCD. [Source file or documentation] github.com.
  10. antoinebou12. (). #4 — anisotropic friction. [Source file or documentation] github.com.
  11. ipc-sim. (). ipc-toolkit. [Software repository] github.com.

References use this article’s publication date.