Skip to content

milmillin/knit-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knit Simulation Project

This projects simulates yarn interactions.

Dependencies and First-Time Setup

The dependencies are STL, GLM (for upstream code) , Eigen (for matrix calculations), spdlog (for logging) and libigl (for visualization). An optional dependency is Easy Profiler.

Since many dependencies are included as git submodules, you need to run the following commands after you clone the repo.

cd knit-simulation/
git submodule update --init --recursive
git clone https://github.com/g-truc/glm.git # if you don't have GLM installed before

Easy Profiler

Easy Profiler is used to time the program and help with algorithm optimization. It's intended for developers and not useful for the user.

If you want to avoid this dependency, change set(ENABLE_EASY_PROFILER TRUE) to FALSE in CMakeList.txt.

Linux

To insall Easy Profiler, follow the documentation on the project page,

Or follow the following instruction: (source)

git clone https://github.com/yse/easy_profiler.git

cd easy_profiler && mkdir build && cd build

cmake-gui ..
make -j8
sudo make install

Windows

Download the release version of easy_profiler here and extract it somewhere. Change the path in set(EASY_PROFILER_DIR "${PROJECT_SOURCE_DIR}/../easy-profiler") in CMakeLists.txt to match your easy_profiler folder location.

Compile

Compile this project using the standard cmake routine:

mkdir build
cd build
cmake ..
cmake --build .

This should find and build the dependencies and create a knit-simulator binary.

Usage

./knit-simulator <yarns-filename> [-r,--restore] [--no-gui]
    [-o,--output-dir <output-directory>] [-v,--verbose] [--quiet]

Options

  • -r,--restore : (optional) The simulator will not restore the state and history located in the output directory.
  • --no-gui : (optional) Start the simulator without GUI. (useful when running on a remote machine)
  • -o,--output-dir <output-directory> : (optional, default = output/) Specify the output directory.
  • -v,--verbose : (optional) Show all logs.
  • --quiet : (optional) Don't show any logs.

Output File

The output directory consists of viewer-state.txt, position-xxxxx.yarns, and velocity-xxxxx.yarns. The viewer-state.txt contains number of frames and all the parameters used by the simulator. This file will be updated at every frame.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published