SET_VIEW3D Procedure

Generates a 3D view, given a view position and a view direction.

Usage

SET_VIEW3D, viewpoint, viewvector, perspective, izoom, viewup, viewcenter, winx, winy, xr, yr, zr 

Input Parameters

viewpointA three-element vector containing the point from which to view the data in data coordinates.

viewvectorA three-element vector containing the direction to look.

perspectiveThe perspective projection distance. The smaller the projection distance, the more “severe” the projection is. The larger the projection distance, the more “isometric” the projection is.

Note:

To prevent a perspective projection, set perspective to 0 (or less than zero).

izoomThe magnification factor for the projection.

viewupA two-element vector containing the final 2D view up vector. For a “right-side-up” view, set this parameter to [0.0, 1.0].

viewcenterA two-element vector containing the window location on which to place the viewpoint. It is in normal coordinates and is usually set to [0.5, 0.5].

winx, winyThe x and y dimensions, respectively, of the plot window in device coordinates. Typically, winx and winy are set to the X and Y size of the current graphics window.

xr, yr, zrTwo-element vectors containing the minimum and maximum x, y, and z values, respectively, found in the data to be plotted. The minimum value is in xr(0), yr(0), and zr(0); the maximum value in xr(1), yr(1), and zr(1).

Keywords

None.

Discussion

SET_VIEW3D creates a view transformation that preserves the correct aspect ratio of the data, even if the plot window is non-square.

SET_VIEW3D changes the system viewing matrix !P.T, as well as the system variables, !X.S, !Y.S, and !Z.S, which handle conversion from data coordinates to normal coordinates. (These system variables are described in System Variables.)

Examples

See the Examples section in the description of the POLY_DEV routine.

See Also

CENTER_VIEW