My final project is a simulation of mixing fluids. I was particularly interested in depicting the mixing of milk and tea in a Thai Iced Tea. I used the real-time fluid methods outlined by Jos Stam in his essay, "Real-Time Fluid Dynamics for Games."
The software is written on a Mac. Run make to compile. It should work on Unix/Windows. For these Operating Systems, remove the -framework flags and add links to your OpenGL and GLUT library directories.
The interface of the program.
Above, a still from the simulation. The fluids are mixing due to a stirring motion. The liquids are meant to represent a Thai Iced Tea: milk at the top, tea at the bottom.
Above, a still from the simulation in which the user is poking the mixture.
Above, an image of the velocity field which governs the motion of the fluids. Note that it is 2-dimensional. To achieve a 3-dimensional effect, I restricted my mixing to events near the edge of the glass, and performed a mapping from the plane to a conical cylinder.
Here is a video of the program in action.