This is an implementation of fluid/liquid dynamics using Cellular Automata. The purpose of this project is to show how dramatic is the difference of computing the evolution of cells with two approaches: naive grid cell evolution in CPU, and compute shaders in GPU.
You can find more about the journey of this project here.
- The elements that can be drawn on the canvas are:
- Ground NumKey 1
- Water NumKey 2
- Acid NumKey 3
- Increase the size of the brush with the mouse wheel
- Generate a new procedural cave map with N
- Clean the map with C
- Rotate the map with R
- Quit the program with Esc
- Rust
- GLFW
- Clone the repository
$ git clone https://github.com/0x7b1/cellular-automata-fluid-simulation.git
$ cd cellular-automata-fluid-simulation
- Run the simulation
$ cargo run
- http://www.jgallant.com/2d-liquid-simulator-with-cellular-automaton-in-unity/
- https://jonathansteyfkens.com/blog/rust/2018/08/07/rust-conway-game-of-life.html
- https://maxbittker.com/making-sandspiel
- https://thebookofshaders.com/edit.php?log=160909064723
- https://thebookofshaders.com/edit.php?log=160909064528
- https://thebookofshaders.com/edit.php?log=161127202429
- https://nullprogram.com/blog/2020/04/30/