Cubica++
This is a source code release for the papers:
Subspace Condensation: Full Space Adaptivity for Subspace Deformations (SIGGRAPH 2015) and

Simulating Articulated Subspace Self-Contact (SIGGRAPH 2014)

   
Download the Source
This code is released under the GNU Public License.
A BSD version is available upon request.
   

   
Instructions:
   
Every effort has been made to remove all external dependencies from this source code, so you should be able to build it by just calling make. Notably, the PETSc and SLEPc dependencies in the original Cubica release have been removed. The build has been tested on both OSX Yosemite and Ubuntu 12.

By default, the code is set up to build on OSX. If you want to build on Ubuntu, copy the file projects/common.linux.inc to projects/common.inc. OpenMP is also disabled by default, in case your system does not support it. In order to enable it, open include/SETTINGS.h and set the macros USING_OPENMP and USING_SUBSPACE_OPENMP to 1.

Once you have built the code, the following toolchain will reproduce the Hand example in the 2015 paper (Figs. 5 and 7).

      ./bin/ConvertTetGen ./cfg/chand.fullsim.0.cfg
      ./bin/RigMesh ./cfg/chand.fullsim.0.cfg
      ./fullsim.sh
      ./bin/TransformDisplacements ./cfg/chand.training.cfg
      ./bin/ComputeBasis ./cfg/chand.training.cfg
      ./bin/PartitionedInternalForceCubature ./cfg/chand.training.cfg
      ./bin/SCFCubature ./cfg/chand.training.cfg
      ./bin/PartitionedHybridSim ./cfg/chand.run.cfg
    
The fullsim.sh script will take the longest, because it generates all the fullspace training data. On our systems, it runs for roughly an hour. The last line executes the technique from the 2015 paper, and the second to last line computes the self-collision cubature from the 2014 paper.
   

This material is based upon work supported by a National Science Foundation CAREER award (IIS-1253948). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.