;  $Id: //depot/idl/IDL_71/idldir/examples/doc/plot/showhaus#1 $

;  Copyright (c) 2005-2009, ITT Visual Information Solutions. All
;       rights reserved.
; 
; This batch file creates four three-dimensional representations of
; a house. The example is from Chapter 11, "Plotting Multi-dimensional
; Arrays", of _Using IDL_.

; Create a handy constant.
H = [0.5, 0.5, 0.5]

; Create a window for the first image.
WINDOW, 1, XSIZE=500, YSIZE=350

;Set up no rotation, scale, and draw house.
T3D, /RESET & HOUSE

; Use the READ procedure to prompt the user to press a key. The
; value stored in the variable 'var' is not used. 

var=''
READ, var, $
    PROMPT='Press Return to display the house rotated 30 degrees'

WINDOW, 2, XS=500, YS=350

;Straight projection after rotating 30 degrees about x and y axes. 
T3D, /RESET, TRANS = -H, ROT = [30, 30, 0] & T3D, TR = H & HOUSE

READ, var, $
    PROMPT='Press Return to display the house with an oblique projection'

WINDOW, 3, XS=500, YS=350

;No rotation, oblique projection, z factor = 0.5, angle = 45. 
T3D, /RESET, TRANS = -H, ROT=[0, 0, 0], OBLIQUE=[.5, -45] & T3D, TR = H & HOUSE

READ, var, $
    PROMPT='Press Return to display the house rotated 6 degrees, with perspective'

WINDOW, 4, XS=500, YS=350

;Rotate 6 degrees about x and y, then apply perspective. 
T3D, /RESET, TR=-H, ROT=[-6, 6, 0], PERS=4 & T3D, TR=H & HOUSE

READ, var, $
    PROMPT='Press Return delete all four windows'

; Delete the windows.

WDELETE, 1, 2, 3, 4


