Returns a list of 3D points converted from normalcoordinates to device coordinates.
winx, winy (optional) The maximum x and y dimension, respectively, in device coordinates. If these parameters are omitted, the values of !D.X_Size and !D.Y_Size are used.
PRO poly_demo1 winx = 1000 winy = 750
imgx = 477 imgy = 512
elev_dat = BYTARR(imgx, imgy) OPENR, 1, !Data_Dir + 'bldr_elev.dat' READU, 1, elev_dat CLOSE, 1
landsat = BYTARR(imgx, imgy) OPENR, 1, !Data_Dir + 'bldr_img7.dat' READU, 1, landsat CLOSE, 1
imgx = 120 imgy = 125 elev_dat = CONGRID(FLOAT(elev_dat), imgx, $ imgy, /Interp)
landsat = BYTSCL(CONGRID(FLOAT(landsat), $ imgx, imgy, /Interp), Top = 127)
zscale = 0.08
viewpoint = [105.0, 70.0, (5.0 * zscale)] viewvector = [-10.0, -2.5, -0.75] perspective = 0.06 izoom = 11.0 viewup = [0.0, 1.0] viewcenter = [0.5, 0.5] xr = [0, (imgx - 1)] yr = [0, (imgy - 1)] zr = [MIN(elev_dat), MAX(elev_dat)]
elev_dat = elev_dat * zscale
SET_VIEW3D, viewpoint, viewvector, $ perspective, izoom, viewup, $ viewcenter, winx, winy, xr, yr, zr
PRINT, "Building polygons ..." POLY_SURF, elev_dat, vertex_list, $ polygon_list, pg_num
vertex_list = vertex_list PRINT, "Normalizing coordinates ..." vertex_list = POLY_NORM(vertex_list)
PRINT, "Transforming coordinates ..." vertex_list = POLY_TRANS(vertex_list, !P.T)
PRINT, "Changing to device coordinates ..." vertex_list = POLY_DEV(vertex_list, winx, $ winy)
WINDOW, XSize=winx, YSize=winy, XPos=10, $ YPos=50, Colors=128
PRINT, "Plotting ..." landsat = POLY_C_CONV(polygon_list, landsat)
POLY_PLOT, vertex_list, polygon_list, $ pg_num, winx, winy, landsat, -1, -1
END
sphere_demo2
, sphere_demo3
, and vol_demo4
demonstration programs in:
wavedir/demo/arl
wavedir:[DEMO.ARL]
wavedir\demo\arl
wavedir
is the main PV-WAVE directory.
For more information, see Coordinate Conversion in Chapter 7, and Three Graphics Coordinate Systems in Chapter 4, of the PV-WAVE User's Guide.