The CREATE_VIEW procedure sets the various system variables required to define a coordinate system and a 3-D view. This procedure builds the system viewing matrix
CREATE_VIEW sets the following IDL system variables:
| |
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
This routine is written in the IDL language. Its source code can be found in the file create_view.pro in the lib subdirectory of the IDL distribution.
CREATE_VIEW [, AX=value] [, AY=value] [, AZ=value] [, PERSP=value] [, /RADIANS] [, WINX=pixels] [, WINY=pixels] [, XMAX=scalar] [, XMIN=scalar] [, YMAX=scalar] [, YMIN=scalar] [, ZFAC=value] [, ZMAX=scalar] [, ZMIN=scalar] [, ZOOM=scalar or 3-element vector]
This procedure has no required arguments.
A floating-point value specifying the orientation (X rotation) of the view. The default is 0.0.
A floating-point value specifying the orientation (Y rotation) of the view. The default is 0.0.
A floating-point value specifying the orientation (Z rotation) of the view. The default is 0.0.
A floating-point value specifying the perspective projection distance. A value of 0.0 indicates an isometric projection (NO perspective). The default is 0.0.
Set this keyword if AX, AY, and AZ are specified in radians. The default is degrees.
A long integer specifying the X size, in pixels, of the window that the view is being set up for. The default is 640.
A long integer specifying the Y size, in pixels, of the window that the view is being set up for. The default is 512.
A scalar specifying the maximum data value on the X axis. The default is 1.0.
A scalar specifying the minimum data value on the X axis. The default is 0.0.
A scalar specifying the maximum data value on the Y axis. The default is 1.0.
A scalar specifying the minimum data value on the Y axis. The default is 0.0.
Set this keyword to a floating-point value to expand or contract the view in the Z dimension. The default is 1.0.
A scalar specifying the maximum data value on the Z axis. The default is 1.0.
A scalar specifying the minimum data value on the Z axis. The default is 0.0.
A floating-point number or 3-element vector specifying the view zoom factor. If zoom is a single value then the view will be zoomed equally in all 3 dimensions. If zoom is a 3-element vector then the view will be scaled zoom[0] in X, zoom[1] in Y, and zoom[2] in Z. The default is 1.0.
Set up a view to display an iso-surface from volumetric data. First, create some data:
vol = FLTARR(40, 50, 30) vol(3:36, 3:46, 3:26) = RANDOMU(S, 34, 44, 24) FOR I = 0, 10 DO vol = SMOOTH(vol, 3)
Generate the iso-surface.
SHADE_VOLUME, vol, 0.2, polygon_list, vertex_list, /LOW
Set up the view. Note that the subscripts into the Vol array range from 0 to 39 in X, 0 to 49 in Y, and 0 to 29 in Z. As such, the 3-D coordinates of the iso-surface (vertex_list) may have the same range. Set XMIN, YMIN, and ZMIN to zero (the default), and set XMAX=39, YMAX=49, and ZMAX=29.
WINDOW, XSIZE = 600, YSIZE = 400 CREATE_VIEW, XMAX = 39, YMAX = 49, ZMAX = 29, $ AX = (-60.0), AZ = (30.0), WINX = 600, WINY = 400, $ ZOOM = (0.7), PERSP = (1.0)
Display the iso-surface in the specified view.
img = POLYSHADE(polygon_list, vertex_list, /DATA, /T3D) TVSCL, img
Introduced: Pre 4.0