Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lyd405121/PBD
Using taichi to implement position based dynamic
https://github.com/lyd405121/PBD
Last synced: about 2 months ago
JSON representation
Using taichi to implement position based dynamic
- Host: GitHub
- URL: https://github.com/lyd405121/PBD
- Owner: lyd405121
- Created: 2022-05-10T07:58:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-04T03:11:21.000Z (over 2 years ago)
- Last Synced: 2024-08-02T11:23:38.888Z (5 months ago)
- Language: Python
- Size: 6.7 MB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-taichi - Positon based dynamic with Taichi - Positon-based dynamics with Taichi. (Applications / **Simulation**)
- awesome-taichi - Positon based dynamic with Taichi - Positon based dynamic with Taichi. (**Simulation**)
README
# Positon based dynamic with taichi
- The code implements one of nvidia's paper [PBD](https://mmacklin.com/uppfrta_preprint.pdf)
- The code uses [Taichi](https://github.com/taichi-dev/taichi) programming language
---
## How to run
- First config your anaconda workspace, and open the anaconda prompt
- Second you need to install dependency
```python
pip install -r requirements.txt
```- Last you type
```python
ti Example.py
```---
## How to generate voxel file
- First copy your obj file to "model" , for example "Bearings.obj"
- Second you need to modify the code in GenVoxel.py
```python
obj_name = "Bearings"
```- Then you type
```python
ti GenVoxel.py
```- Last you will get a voxel file like below:
![image](image/howto.png)
## Some example
- Rigidbody Simulation
- Red particle means it contact ground plane, green means it has at least one neighbour from other rigidbody![image](image/taichi.gif)