Homebrew fluid simulator: smoke and liquids in C++