[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

optimization question: a faster way to PIXMAP?



A question for the IDL gurus:

- I have data in the form of irregular polygons, each polygon has 
  an associated value (let's call it an amplitude).  I want a 
  composite image of the sum of all these polygons' amplitudes.

- My current approach is to :

   (1) create a (large) WINDOW,../PIXMAP, 
   (2) render each polygon using POLYFILL
   (3) TVRD() the pixmap window
   (4) add this to an accumulation array

   ... iterate (1)-(4) until all polygons have been rendered

This works, but is painfully slow.  Profiling the code shows that 
  by far the most significant logjam is the TVRD() of the pixmap.

So: does anyone know of more efficient ways to do this?  Is the Z
  device an option - it seems like it can be used for internal frame
  storage, but would still have to be probed by TVRD()...?

Thanks,

Dennis

-- 
  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  _/ Dennis J. Boccippio                                        _/
  _/ http://fly.hiwaay.net/~djboccip/Dennis.html                _/
  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/