[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimization question: a faster way to PIXMAP?
I actually encountered a different problem and am currently using the
solution that you hinted at. I read Randall's hint and I don't think
it applies to me as I am summing multiple samples of a waveform to
create a color-coded plot of a waveform. Here's a cut-and-paste of
some of the code I used. It's highly abbreviated, but will give you an
idea of have the Zbuffer works and will let you develop your own test
case. It aint super speedy (uses TVRD), but it works just fine.
intensity_array = uintarr(540, 459) ; image array
current_clip = !P.CLIP ; Copy current clipping boundaries
DEVICE, Z_BUFFERING = 0
device, set_resolution = [540,459]
!P.CLIP = current_clip ; Make Z-buffer clip same boundaries
; Setup new color table for Z-buffer image
table = intarr(256)
table = 255
tvlct, table, table, table
FOR i = <1st plot>, <2nd plot>, incr DO BEGIN
plots, x_data, y_data, color = 1
intensity_array = temporary(intensity_array) + tvrd()
The 'intensity_array' now contains your summed data.
Hope this helps,
"They don't think it be like it is, but it do."
Oscar Gamble, NY Yankees
Sent via Deja.com http://www.deja.com/
Before you buy.