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…

December 8th, 2007 at 11:10 pm
Looking for your code release!
December 8th, 2007 at 11:27 pm
OK. I want to speed this up because it is very slow, but I think a DLM is the only way to make this a reasonable speed. I’ll release the pure IDL version now then.
December 9th, 2007 at 12:01 am
[...] was hoping to speed up the code I mentioned last month implementing a line integral convolution (LIC) flow visualization, but I haven’t had time to [...]
March 18th, 2008 at 1:00 am
Hi,
I download the mg_lic.pro source code file and run it in IDL,which causes my computer to crash down and I can’t see any result.
so I want to know, My computer is about 1GB’s memory,so maybe too small:)
or would you like to tell me how to run your program more efficient?
thanks a lot
March 18th, 2008 at 1:30 pm
It is very slow right now. I haven’t had the time to finish writing this as a DLM which I’m hoping will make this take a reasonable time. Follow the other post about LIC for updates on the code.
April 11th, 2008 at 12:18 am
[...] have finished the line-integral convolution (LIC) implementation as a DLM and cleaned it up a bit (see other articles for background). More work is needed, but it can give useful results now. The movie [...]