I don't know if this will be very helpful but I think it is a cool piece of information that I wanted to pass along. If you use the IDL 8 Graphics function POLYGON or the graphics object IDLGRPOLYGON (instead of POLYFILL), you can pass information about separate polygons into the same data set and use the CONNECTIVITY keyword to specify which data points should be connected. If you use this method, then you do not have to loop through the data, and render each polygon separately. An example of this is shown below:
pro polygon_test_time
compile_opt idl2
x1 = [1,1,3,3]
y1 = [1,4,4,1]
x2 = [1,1,3,3]
y2 = [6,10,10,6]
x3 = [2,2,4,4]
y3 = [3,8,8,3]
xx = [1,1,3,3,1,1,3,3,2,2,4,4]
yy = [1,4,4,1,6,10,10,6,3,8,8,3]
conn = [4,0,1,2,3,4,4,5,6,7,4,8,9,10,11]
plo = plot(findgen(12),findgen(12),/NODATA)
pol = polygon(xx,yy,CONNECTIVITY=conn, /data, FILL_COLOR='light blue')
end
|