/Fluid-simulator

A simple program that simulates fluid in real-time. Rendered using OpenGL.

Primary LanguageC++The UnlicenseUnlicense

Screenshots of the program and Windows and Linux binaries compiled by Antti Vainio are available on his site at:
https://www.anttivainio.net/fluid_simulator


This program is quite a simple two-dimensional fluid simulator. The simulation is not supposed to be accurate but an approximation that runs in real-time. The fluid consists of many individual particles and is rendered simulating metaballs to make it look like liquid.

NOTES:
The fluid can be pulled towards the mouse cursor by pressing down mouse1.
The fluid can be repelled away from the mouse cursor by pressing down mouse2.
The program defaults to a water like liquid but there are few presets that can easily be chosen by editing the PRESET define in loop.cpp.


Compiling instructions:
The program can be compiled at least on Windows and Linux.
Linux users may use the provided Makefile to compile the program. You must have the dev package of GLFW installed to compile.
If you don't use the Makefile (like on Windows) you should link at least glfw and opengl32.


Running the program:
Once compiled, you must have your graphic card drivers installed and support for OpenGL 1.1.


This program was originally released on April 11th, 2013 at https://www.anttivainio.net

You may use all the source codes for anything you want.