[SciPy-user] Questions about Line Integral Convolution tutorial
Bridgman, William T.
Mon Nov 24 13:41:50 CST 2008
I had found the Cabral reference, as well as a few others that
described either different algorithms or described them in radically
Transposing the texture solved my crashing problem. That seems kind
of counter-intuitive. Perhaps it could be noted in the docs somewhere
or changed in the interface?
Thanks for the assistance,
> Hi William,
> I am not the author, but I may be able to answer some of your
> 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
> convolution. SIGGRAPH '93: Proceedings of the 20th annual conference
> 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
> although you may need to transpose the texture array to get it to
> > 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
> named vectorplot using the code she posted in the cookbook. This can
> 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.
Dr. William T."Tom" Bridgman Scientific Visualization
Global Science & Technology, Inc. NASA/Goddard Space Flight
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/
More information about the SciPy-user