Rigid IPC
Robust, intersection-free, simulations of rigid bodies.
This is the open-source reference implementation of the SIGGRAPH 2021 paper Intersection-free Rigid Body Dynamics.
Files
src/
: source codecmake/
andCMakeLists.txt
: CMake filesfixtures/
: input scripts to rerun all examples in our papermeshes/
: input meshes used by the fixturestests/
: unit-teststools/
: Python and Bash scripts for generating and processing resultscomparisons/
: files used in comparisons with other rigid body simulatorspython/
: Python binding filesnotebooks/
: Jupyter notebooks
Build
To build the project, use the following commands from the root directory of the project:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
Dependencies
All dependancies are downloaded through CMake depending on the build options. The following libraries are used in this project:
- IPC Toolkit: common IPC functions
- Eigen: linear algebra
- libigl: basic geometry functions, predicates, and viewer
- TBB: parallelization
- Tight Inclusion CCD: correct (conservative) continuous collision detection between triangle meshes in 3D
- spdlog: logging information
- filib: interval arithmetic
- Niels Lohmann's JSON: parsing input JSON scenes
- tinygltf: exporting simulation animation to GLTF format
- finite-diff: finite difference comparisons
- Only used by the unit tests and when
RIGID_IPC_WITH_DERIVATIVE_CHECK=ON
- Only used by the unit tests and when
Optional
- Catch2: unit tests
Scenes
We take as input a single JSON file that specifies the mesh and initial conditions for each body. The fixtures
directory contains example scenes.
Python Bindings
We expose some functionality of Rigid IPC through Python. This is still in development and lacks the ability to script many features available in the full simulator.
To build the Python bindings use the setup.py
script:
python setup.py install