A framework to simulate knotted elastic rods with self-contacts.
This is the codebase associated to the SIGGRAPH 2023 paper Computational Exploration of Multistable Elastic Knots.
To know more about our research, please visit the project webpage.
To install the required dependencies, please follow the instructions from https://github.com/jpanetta/ElasticRods
Clone this repository recursively so that its submodules are also downloaded:
git clone [email protected]:EPFL-LGG/ElasticKnots.git --recurse-submodules
The file environment.yml
contains all the Python dependencies needed to run the demo Jupyter notebooks.
Create the conda environment ElasticKnots
conda env create -f environment.yml
and activate it (make sure to do this before compiling the Python bindings):
conda activate ElasticKnots
Build the C++ code and its Python bindings:
python setup.py
Alternatively, you can manually build the project using cmake and your favorite build system. For example, with ninja
:
cd ElasticKnots
mkdir build && cd build
cmake .. -GNinja
ninja
Launch Jupyter lab from the root directory:
jupyter lab
Now try opening and running an example notebook, e.g., python/Demo-1-Simulation.ipynb
to test the simulation framework.