[SciPy-user] Questions about Line Integral Convolution tutorial

David Huard david.huard@gmail....
Mon Nov 24 13:05:54 CST 2008

Hi William,

I am not the author, but I may be able to answer some of your questions.

On Mon, Nov 24, 2008 at 11:46 AM, Bridgman, William T. <
William.T.Bridgman@nasa.gov> wrote:

> Hello,
> I found the Line Integral Convolution (LIC) example very timely for a
> project I'm working on.
> http://www.scipy.org/Cookbook/LineIntegralConvolution
> Once Cython & Pyrex were installed, the demo ran out of the box.
> Excellent.
> However, now I'm trying to apply this to a different dataset and the C
> component is crashing with index errors.  I suspect these are being
> caused by the fact that my dataset is not a square array.
> An examination in the .pyx file has a couple of locations where the
> array indices appear to be transposed between x,y vs i,j.  I'm not
> sure if this is a bug or not.  The high symmetry of the demo vector
> field would probably not reveal this if it were a bug.
> So my questions for the author of the code or the list are:
> 1) Is there a paper or other reference for the algorithm implemented
> here?  My searches have revealed several types of LIC
> implementations.  It would be nice if this were in code comments or at
> least on the tutorial page.

I am not sure which paper Anne has used, but I have found

Cabral, Brian and Laeith Leedom. Imaging vector fields using line integral
convolution. SIGGRAPH '93: Proceedings of the 20th annual conference on
Computer graphics and interactive techniques, pages 263-270, 1993.

a very useful reference.

> 2) Is the algorithm, the demo code, or LIC in general, restricted to
> square arrays?

Not that I know of. I have used it on rectangular arrays and it's working,
although you may need to transpose the texture array to get it to work.

> 3) Is there a pure-python or numpy-only (no Cython or Pyrex
> requirement) implementation?

Not that I know of. However, with Anne's consent, I have created a scikit
named vectorplot using the code she posted in the cookbook. This can be
installed with a simple
python setup.py install
It's still not pure python, but you won't need Cython to compile the
extension. I've added docstrings, a bit of documentation and utiliy
functions to generate kernels that I use to "animate"  vector fields.

You can check out the code with subversion at
http://svn.scipy.org/svn/scikits/trunk/vectorplot, but bear in mind that the
user interface might change.



> Thanks,
> Tom
> --
> Dr. William T."Tom" Bridgman               Scientific Visualization
> Studio
> Global Science & Technology, Inc.          NASA/Goddard Space Flight
> Center
> Email: William.T.Bridgman@nasa.gov         Code 610.3
> Phone: 301-286-1346                        Greenbelt, MD 20771
> FAX:   301-286-1634                        http://svs.gsfc.nasa.gov/
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20081124/d29ff9a9/attachment.html 

More information about the SciPy-user mailing list