comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » optimization question: a faster way to PIXMAP?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: optimization question: a faster way to PIXMAP? [message #20667 is a reply to message #20579] Sat, 15 July 2000 00:00 Go to previous messageGo to previous message
Dennis J. Boccippio is currently offline  Dennis J. Boccippio
Messages: 6
Registered: July 2000
Junior Member
Thanks to both Randall and Bill for the tips...

I've found a temporary workaround which is only enabled by the fact that
my polygons are much smaller than the summation grid ... I allocate much
smaller drawing windows, which tremendously speeds up TVRD(), and
accumulate them into the appropriate summation grid subarrays. However,
this is obviously case-specific, and doesn't solve the general problem
of full-image accumulation. (Indeed, once this kludge is implemented,
the initial PLOT used to set up each temporary frame's coordinate bounds
becomes the bottleneck... it seems the graphics functions are just
[relatively] slow).

Non-graphics and POLYFILLV sounds promising... will check that shortly.

Bill: I've benched your suggested code using both PIXMAP and the
Z-buffer. The Z-buffer (at least on a Mac) seems to win out
significantly:

Z_buf PIXMAP
----- ------
main 95.72 151.45
tvrd 17.04 38.45
plots 14.07 49.95
randomu 1.38 1.34
sin 1.35 1.37
findgen 0.38 0.59

Surprising ... I'm curious how the guts of drawing to the Z-buf are
different from the guts of drawing to a PIXMAP...

- Dennis

Test code below:

pro testzbuf

intensity_array = uintarr(540, 459) ; image array
current_clip = !P.CLIP ; Copy current clipping boundaries

set_plot, 'z'
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[1] = 255
tvlct, table, table, table

plot,1*!pi*findgen(1000)/1000,sin(4*!pi*findgen(1000)/1000) + $
randomu(seed,1000),color=1,/nodata

FOR i = 0, 4000, 1 DO BEGIN
plots,1*!pi*findgen(1000)/1000,sin(4*!pi*findgen(1000)/1000) + $
randomu(seed,1000),color=1
intensity_array = temporary(intensity_array) + tvrd()
ENDFOR

device, /close
set_plot, 'mac'

end

pro testpixmap

set_plot,'mac'
intensity_array = uintarr(540, 459) ; image array
window,0,xsize=540,ysize=459,/pixmap
plot,1*!pi*findgen(1000)/1000,sin(4*!pi*findgen(1000)/1000) + $
randomu(seed,1000),color=1,/nodata
table = intarr(256)
table[1] = 255
tvlct, table, table, table

FOR i = 0, 4000, 1 DO BEGIN
plots,1*!pi*findgen(1000)/1000,sin(4*!pi*findgen(1000)/1000) + $
randomu(seed,1000),color=1
intensity_array = temporary(intensity_array) + tvrd()
ENDFOR

set_plot, 'mac'

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Link IDL to ORACLE Pro*FORTRAN
Next Topic: assignment inside boolean expression

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:30:42 PDT 2025

Total time taken to generate the page: 7.51823 seconds