pro shade, ax, ay, az, xwsize, ywsize ; ; proceedure to perform a 3-D solid shaded bundle ; openr, 1, 'shade.dat' readf, 1, npts, npols v = fltarr(3, npts) readf, 1, v minvx = 0 minvy = 0 minvz = 0 maxvx = 0 maxvy = 0 maxvz = 0 for j = 0, npts-1 do begin ; change from my to their coordinate system ; dummy = v(1, j) ; ; v(1, j) = -v(2, j) ; v(2, j) = dummy if v(0, j) lt minvx then begin minvx = v(0, j) endif if v(0, j) gt maxvx then begin maxvx = v(0, j) endif if v(1, j) lt minvy then begin minvy = v(1, j) endif if v(1, j) gt maxvy then begin maxvy = v(1, j) endif if v(2, j) lt minvz then begin minvz = v(2, j) endif if v(2, j) gt maxvz then begin maxvz = v(2, j) endif endfor print, '>', minvx, minvy ,minvz, maxvx,maxvy,maxvz i = intarr(5*npols) readf, 1, i center_view, Ax = ax, Ay = ay, Az = az, $ Winx = xwsize, Winy = ywsize, $ Xr = [minvx, maxvx], $ Yr = [minvy, maxvy], $ Zr = [minvz, maxvz], $ Zoom = 0.8 set_shading, gouraud=0, Light = [-.5, .5, 1] window,1,xsize=xwsize,ysize=ywsize image=polyshade(v, i, /t3d) tvscl, image close, 1 return end