I have been searching for a better visualization for vector fields for awhile. Line integral convolution (LIC) is one of several methods that seems promising.

The main references I used for my LIC implementation is the original paper “Imaging Vector Fields Using Line Integral Convolution” by Brian Cabral and Leith (Casey) Leedom and this C++ implementation by Bill Martin.

I used the globalwinds.dat data set in the examples/data directory of the IDL distribution for all the visualizations in this article. The standard visualization for a vector field is to display arrows on a grid of the data points. For example, iVector produces the following visualization.

I find this type of display difficult to gain much from for datasets larger than a few tens of elements on a side.

The code I have (slowly) produces the below greyscale image. Besides the slow performance, I’m pretty happy with the result. This is not the best visualization for all tasks, but it’s a pretty good general purpose display.

But this only indicates the direction of the vectors in the vector field (and leaves two possibilities at that), saying nothing of the magnitude of the vectors. The simplest way that I thought of adding magnitude was to use the HSV color system with hue equalling red, saturation equalling magnitude, and using the LIC output as the value. This produces:

Some other tries that I think are promising:

Not bad, but I’m going to sharpen up this code a bit before I release it. This is still a work in progress…