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
viewpoint—A three-element vector containing the point from which to view the data in data coordinates.
viewvector—A three-element vector containing the direction to look.
perspective—The 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). |
izoom—The magnification factor for the projection.
viewup—A two-element vector containing the final 2D view up vector. For a “right-side-up” view, set this parameter to [0.0, 1.0].
viewcenter—A 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, winy—The 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, zr—Two-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
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.