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.

Flow visualization of globalwinds.dat

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.

iVector visualization for globalwinds.dat

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.

LIC visualization

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:

LIC visualization with adding color for magnitude

Some other tries that I think are promising:

LIC visualization with adding color for magnitude

LIC visualization with adding color for magnitude

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