Fluids

CUDA-based fluid solver. Using Back and Forth Error Compensation and
Correction for increased detail (notice how smaller features are
preserved compared to a direct implementation of Stam's stable fluids).
The densities are ray-casted for visualization.

Running on a MacBook Pro 13'' (GeForce 320m).

Very simple CUDA-based water volume renderer with reflection,
refraction, Fresnel reflectivity and wet effect --the rate the ground
dries is exaggerated. The heightfields are ray-casted

Not using
any illumination model, environment maps or texture maps for the moment.
The ground and the water heightfields are actually sinusoidal functions
(a combination of sine and cosine) for visualizing purposes only and
they are not physically-based.

Refraction indices: a) water: 1.33 b) air: 1.0.

Comparing pure Level Set advection (i.e. no Marker Level Set or Particle
Level Set for the moment) using semi-Lagrangian and Back And Forth
Error Compensation and Correction methods --the difference is quite
obvious.

CPU-based, Level Set implementation showing the popular Zalesak's disk. Given the velocity field defined by

u(x; y) = (\pi / 314)(128 - y)
v(x; y) = (\pi / 314)(x - 128)

the
level set is moved using the advection schemes mentioned above.
Yellowish colors indicate \phi lesser than 0 and the gray scales
indicate \phi greater than 0, where \phi is simply a scalar field (level
set).

I used a relatively high Courant-Friedrichs-Lewy (CFL) number of 5+.

A not-so-interesting implementation of MLS-2 [1]. (I will probably have
to tune some parameters.) Early tests seem to show that only one
reinitialization iteration is required every 3 (possibly more) time
steps. Note the reinitialization is applied only in a tubular
neighborhood near the interface.

The level set itself is moved
using semi-Lagrangian advection, the particles are moved using
second-order Runge-Kutta and a fast PDE-based reinitialization [2].

This
first version runs in the CPU. The Zalesak's disk is defined by a
radius of 60, slot width of 20 and slot height of 100. The grid size is
256 x 256. Similar (read: better) tests can be found in Enright's PhD
thesis [3], which is illustrative and easy to read.