A stable-fluids solver: velocity is carried along by itself, then corrected so the fluid can neither bunch up nor thin out, which is what makes it swirl. Dye rides along on top. Drag to push the fluid and paint with it; turn up vorticity for smoke, or turn down the fades and watch a single drop of ink unfurl.