This is a 2D implementation of the TVCG paper Fast Animation of Lightning Using An Adaptive Mesh. It includes both the simulation and rendering components described in that paper. In particular, a quadtree conjugate gradient Poisson solver is included.
Source, including a project file for VC++ Express.
If you end up using this software for anything useful, please let us know, and more importantly, please cite our paper:
T. Kim and M. Lin, Fast Animation of Lightning Using an Adaptive Mesh, IEEE Transactions on Visualization and Computer Graphics, Vol. 13, No. 2, pp. 390-402, March/April 2007.
Several pieces of software are used in this project that the respective authors were kind enough to make freely available: