The solver in Pattern.cpp follows Jos Stam’s “A Simple Fluid Solver Based on the FFT”, on a 128 × 128 grid using the FFTW library, and renders into a 256 × 256 window from “Lewpen's pattern generator” (Main.cpp). This is a capture of it running:

A screen capture (FFT_Smoke_001, recorded 28 April 2010), played by Ruffle. demo.swf

Source 4 files