PRO cuber
; this is prototype target display program
; Unit cube is defined by x1, ... z4. By translatting this
; cube to ix0, iy0, iz0 positions one can display target shape
;        
  LoadCt , 2
  Window , 0 , XSize = 400 , YSize = 400 
  colors = !D.N_Colors
  Set_Plot , 'Z'
  Device , Set_Resolution = [400,400] ,$
                  Set_Colors = colors
               
  Surface ,             FIndGen(5,5) ,$
                        FIndGen(5,5) ,$
                        FIndGen(5,5) ,$
                     XRange = [0,10] ,$
                     YRange = [0,10] ,$
                     ZRange = [0,10] ,$
                                /T3D ,$
                             /NoData ,$
                               /Save
                               
  x1 = [0,0,0,0]
  x2 = [0,1,1,0]
  x3 = [1,1,1,1]
  x4 = [1,0,0,1]
  y1 = [1,0,0,1]
  y2 = [0,0,0,0]
  y3 = [0,1,1,0]
  y4 = [1,1,1,1]
  z1 = [0,0,1,1] 
  z2 = [0,0,1,1]
  z3 = [0,0,1,1] 
  z4 = [0,0,1,1]
   
  
  FOR ii = 0 , 9 DO BEGIN
    PolyFill , ii+x1 , ii+y1 , ii/3.0+z1 , /T3D , color =  35
    PolyFill , ii+x2 , ii+y2 , ii/3.0+z2 , /T3D , color =  70
    PolyFill , ii+x3 , ii+y3 , ii/3.0+z3 , /T3D , color = 105 
    PolyFill , ii+x4 , ii+y4 , ii/3.0+z4 , /T3D , color = 140
    PolyFill , ii+x2 , ii+z2 , ii/3.0+y4 , /T3D , color = 175 
    PolyFill , ii+x2 , ii+z2 , ii/3.0+y3 , /T3D , color = 175
  ENDFOR
  
  new = TvRd()
  Set_Plot , 'WIN' ; or 'X' or 'MAC'
  Tv , new
  
END

