Simulates how virtual water would flow in a 2d environment
maze.mp4
snail.mp4
A water simulation written in Rust
Usage: water-simulation.exe [OPTIONS] <IMAGE>
Arguments:
<IMAGE> Location of the image
Options:
-f, --framerate <FRAMERATE> Framerate of the output video [default: 30]
-n, --filename <FILENAME> Name of the output video [default: out.mp4]
-a, --approximate Whether to use the approximate algorithm (gray will be treated as wall)
-d, --debug Whether to convert image to simplest form
-h, --help Print help
-V, --version Print version
- Black (0, 0, 0) = wall
- Blue (0, 0, 255) = water
- Anything else = air
- ffmpeg in path
- cargo if you want to build yourself
- Download the executable
- Run it with the image as an argument
- Install cargo (Rust)
- Run
cargo install water-simulation
- Run
water-simulation your_file.png