Public Matlab code release for the SIGGRAPH Asia 2020 paper Complementary Dynamics by Jiayi Eris Zhang, Seungbae Bang, David I.W. Levin and Alec Jacobson.
libigl
gptoolbox
Bartels
triangle
Before running the code, you need to setup the following.
Compile mex functions in Bartels:
cd Bartles/matlab
mkdir build
cd build
cmake ..
make -j8
Compile mex functions in gptoolbox:
cd gptoolbox/mex
mkdir build
cd build
cmake ..
make -j8
make sure gptoolbox/wrappers/path_to_triangle.m
to indiciate your tirangle binary.
Compile mex functions in matlab-include/mex
by running matlab-include/mex/compileAllMex.m
in Matlab.
This code runs in Matlab.
Before running examples, make sure to addpath
your root directory of this project.
Then, try run examples scripts in examples
in Matlab.
For example, try run examples\bird\bird.m
and you should be getting result like this:
@article{Zhang:CompDynamics:2020,
title = {Complementary Dynamics},
author = {Jiayi Eris Zhang and Seungbae Bang and David I.W. Levin and Alec Jacobson},
year = {2020},
journal = {ACM Transactions on Graphics},
}