https://github.com/takana671/fluidcube
Particle Movement Using Curl Noise
https://github.com/takana671/fluidcube
curl-noise cython numpy panda3d python
Last synced: 1 day ago
JSON representation
Particle Movement Using Curl Noise
- Host: GitHub
- URL: https://github.com/takana671/fluidcube
- Owner: taKana671
- Created: 2026-06-07T06:46:05.000Z (17 days ago)
- Default Branch: main
- Last Pushed: 2026-06-14T02:49:49.000Z (10 days ago)
- Last Synced: 2026-06-14T04:05:53.493Z (10 days ago)
- Topics: curl-noise, cython, numpy, panda3d, python
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FluidCube
In this repository, I experimented with how particles move when their positions are updated using curl noise.
Run `fluid_cube.py` and press the [M] key to start the particle movement.
Once all particles have disappeared, the [M] key can be pressed again. Each time pressing the key, the values of the `noise_scale` and `flow_strength` parameters are automatically set to random numbers, causing the particles to move differently.
The current values are displayed in the console.
The meanings of each parameter are as follows:
#### *noise_scale*
The larger the noise_scale, the greater the particle motion.
#### *flow_strength*
The magnitude of the force generated by the vector field.
The larger the value, the faster the particle moves.
https://github.com/user-attachments/assets/a60178c1-1692-4396-a494-d25702e655aa
# Requirements
* Cython 3.2.3
* numpy 2.2.6
* Panda3D 1.10.16
# Environment
* Python 3.13
* Windows11
# Usage
### Clone this repository.
```
git clone --recursive https://github.com/taKana671/FluidCube.git
```
### Build cython code.
```
cd FluidCube
python setup.py build_ext --inplace
```
If the error like "ModuleNotFoundError: No module named ‘distutils’" occurs, install the setuptools.
```
pip install setuptools
```
### Run fluid_cube.py
```
python fluid_cube.py
```