Skip to content

Eulerian fluid simulation written in rust and raylib

Notifications You must be signed in to change notification settings

MiliAxe/fluidrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluidrs

An Eulerian fluid simulator


Fluidrs is a simple fluid simulator written in Rust with raylib and imgui. This project was created for educational purposes and to learn more about fluid simulation.

Features

  • 2D fluid simulation
  • Ability to change fluid and simulation parameters live with ImGui
  • Enjoy the beauty of playing with fluids

Installation

Just clone the repository and build the program (preferably in release mode):

git clone [email protected]:MiliAxe/fluidrs.git
cargo run --release

Note

You might need to change the Deltatime DT in the src/config.rs file to get the best performance on your machine.

Usage

  • Left click to add fluid
  • Hold right click to add velocity in the mouse direction

Credits

Thanks to Mike Ash's blog post for the great explanation of fluid simulation. Most of the calculation is based on his explanation.

About

Eulerian fluid simulation written in rust and raylib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages