SimKit: A Simulation Toolkit For Computer Animation
Project description
SimKit : A Simulation Toolkit for Computer Animation
This library should be considered a toolbox for the development of physically-based animation research. It is designed to be modular, easy to use, and easy to extend. In particular, it is designed to be emphasize fast creative and experimental prototyping.
Installation
Clone the repository:
git clone --recursive https://github.com/otmanon/simkit.git
Installation is recommended on a fresh conda environment:
cd simkit
conda create -n simkit python=3.11
conda activate simkit
pip install -e .
Optional Dependencies
The base install only requires numpy and scipy -- and now covers the
clustering / sampling helpers (farthest_point_sampling, spectral_clustering,
spectral_cubature) too. Heavier or specialized dependencies are exposed as
named extras so you only install what you need. Importing simkit is always
safe -- functionality whose extras are missing just isn't exported, and a
one-line warning tells you exactly what to install.
| Extra | Adds | Enables |
|---|---|---|
mesh |
libigl |
2D Triangle meshing (shape_outlines) |
viz |
matplotlib, polyscope |
simkit.matplotlib, simkit.polyscope plotters |
solvers |
cvxopt |
Sparse eigensolvers (simkit.eigs) |
video |
Pillow |
simkit.filesystem image / video frame helpers |
cmaes |
cma |
simkit.solvers.CMAESSolver |
all |
union of the above | Everything end-user-facing |
dev |
pytest, pytest-cov |
Running the test suite |
docs |
sphinx, sphinx-autoapi, pydata-sphinx-theme, ... |
Building the documentation |
Install one or more extras with the usual pip syntax:
pip install -e ".[mesh]" # just mesh ops
pip install -e ".[mesh,viz]" # multiple extras
pip install -e ".[all]" # everything end-user-facing
pip install -e ".[all,dev,docs]" # everything, including dev tooling
Running Examples
The repository includes several end-to-end demos under examples/, each
reproducing a slice of a published paper:
fast_complementary_dynamics/-- Fast Complementary Dynamics via Skinning Eigenmodes (SIGGRAPH 2023).modal_muscles/-- CMA-ES-optimised modal-actuator locomotion.subspace_mfem/-- Subspace Mixed FEM elastodynamics (SIGGRAPH Asia 2023), including an interactive demo.force_dual_modes/-- force-dual / linear modal-analysis subspaces.
Each demo has its own README with the exact extras to install and the command
to run. See examples/README.md for the index. As a
quick start:
pip install -e ".[mesh,viz,video]"
python examples/subspace_mfem/drop_fem_vs_mfem.py
Running tests
pip install -e ".[dev]"
pytest
Building the documentation
The docs are generated from the docstrings in the simkit package using
Sphinx + sphinx-autoapi + the PyData theme. To build them locally:
pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html
Then open docs/_build/html/index.html in your browser. Every function in
simkit/ is automatically picked up and rendered into the API reference --
just write a good docstring and rebuild.
Release / dev workflow
Two equivalent ways to do every build/test/release/docs task. Pick whichever you prefer.
scripts/COMMANDS.md— raw, copy/paste-able bash commands organized by task. Read it top-to-bottom or grab whichever block you need. No abstraction, no functions, just shell commands.scripts/release.sh— the same commands wrapped as subcommands so you can run e.g../scripts/release.sh buildinstead of pasting. There's also aMakefilewithmake build/make docs/ etc. targets.
First-time setup on a new machine:
chmod +x scripts/release.sh
conda activate simkit # so `python` points at the right interpreter
Quick reference for the script form:
| What | Command |
|---|---|
| Build sdist + wheel | ./scripts/release.sh build (or make build) |
| Upload to TestPyPI | ./scripts/release.sh upload-test |
| Install from TestPyPI in a throwaway venv | ./scripts/release.sh test-install |
| Upload to real PyPI | ./scripts/release.sh upload-prod |
| Build the docs | ./scripts/release.sh docs |
| Build + open the docs | ./scripts/release.sh docs-open |
| Remove all build/docs/cache junk | ./scripts/release.sh clean |
Local upload vs GitHub Actions Trusted Publishing
The script has the full tradeoff in a header comment. Summarized:
- Local (
upload-test/upload-prod): fastest path, but requires a PyPI API token on your laptop and the build runs in your local environment. Best for the very first upload (claiming the project name) or one-off hotfixes. - GitHub Actions (
.github/workflows/release.yml, triggered by pushing avX.Y.Zgit tag): no secrets stored anywhere thanks to Trusted Publishing; every release is a reproducible build from a tagged commit; auto-publishes to TestPyPI first, then PyPI. Best for every release after the first.
Recommended flow: claim the project on PyPI/TestPyPI with one local upload, then switch to tag-triggered GitHub Actions for everything afterward:
git tag v0.1.0
git push --tags
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simkit-0.1.1.tar.gz.
File metadata
- Download URL: simkit-0.1.1.tar.gz
- Upload date:
- Size: 191.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ea0b9b667623011dd054bf6c3131cb3a3d674f152a436e5df8fe77e4234b05c
|
|
| MD5 |
feed2a8d471837da7a13800f83411511
|
|
| BLAKE2b-256 |
bd132949cd98050b9ac53c9e11f6f4250733fde812cb5b514b24295c475722d3
|
Provenance
The following attestation bundles were made for simkit-0.1.1.tar.gz:
Publisher:
release.yml on otmanon/simkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simkit-0.1.1.tar.gz -
Subject digest:
3ea0b9b667623011dd054bf6c3131cb3a3d674f152a436e5df8fe77e4234b05c - Sigstore transparency entry: 1763304690
- Sigstore integration time:
-
Permalink:
otmanon/simkit@981be3c0069ee5064023637b94ec4d842c522f07 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/otmanon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@981be3c0069ee5064023637b94ec4d842c522f07 -
Trigger Event:
push
-
Statement type:
File details
Details for the file simkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: simkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 188.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9581969bf6618ad239090790eef4840fe71c928ac5632e906017e4c92cd0de35
|
|
| MD5 |
9e730c2e9fe126ed5a40d8f1c39f712f
|
|
| BLAKE2b-256 |
00b4cefb37d858d04d212d43dbce4e8211533b524c46c5ac558d50f8bf59de72
|
Provenance
The following attestation bundles were made for simkit-0.1.1-py3-none-any.whl:
Publisher:
release.yml on otmanon/simkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simkit-0.1.1-py3-none-any.whl -
Subject digest:
9581969bf6618ad239090790eef4840fe71c928ac5632e906017e4c92cd0de35 - Sigstore transparency entry: 1763304822
- Sigstore integration time:
-
Permalink:
otmanon/simkit@981be3c0069ee5064023637b94ec4d842c522f07 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/otmanon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@981be3c0069ee5064023637b94ec4d842c522f07 -
Trigger Event:
push
-
Statement type: