This program is a fluid simulator using "Smoothed-particle hydrodynamics (SPH)" method.
The SPH particles represent the fluid flow. Particles have information about the position, density, and velocity. In every simulation step, they are changed by pressure force, viscosity force, and external force (i.e., gravity).
This program reads a text from standard input, and uses it as an initial configuration of the particles. The character # represents "wall particle" (a particle with fixed position), and any other non-space characters represent free particles.
The compilation options -DG=1 -DP=4 -DV=8 represent, respectively, the factor of gravity, pressure, and viscosity. By changing their values, you can see different fluid behavior.
"Marching square"-like algorithm is used to render the particles.
The Program received a honorable mention in The International Obfuscated C Code Contest.