Generates the vertex list and polygon list that represent asphere.
If radius is a 2D (m, n) array, then the radius of each polygon is generated at the corresponding radius. The radius array is scaled to the dimensions (px, py) before use.
You can use the array returned by the GRID_SPHERE function as radius values.
px A scalar value specifying the number of polygons around the equator.
py A scalar value specifying the number of polygons around the meridian.
polygon_list The list of vertices for each polygon.
For more information, see Vertex Lists and Polygon Lists in Chapter 7 of the PV-WAVE User's Guide.
XMax The longitude of the right edge of the portion of the polygon mesh you want to use (where on the sphere the polygon mesh is to be extracted). Should be in the range - to + radians (-180 to +180 degrees). The value is assumed to be in radians unless the Degrees keyword is set.
If XMax is omitted, a longitude of is mapped to the right edge of the polygon mesh for the entire sphere (when viewed from outside the sphere).
XMin The longitude of the left edge of the portion of the polygon mesh you want to use (where on the sphere the polygon mesh is to be extracted). Should be in the range - to + radians (-180 to +180 degrees). The value is assumed to be in radians unless the Degrees keyword is set.
If XMin is omitted, a longitude of - is mapped to the left edge of the polygon mesh for the entire sphere (when viewed from outside the sphere).
YMax The latitude of the top edge of the polygon mesh. Should be in the range -/2 to +/2 radians (-90 to +90 degrees). The value is assumed to be in radians unless the Degrees keyword is set.
If YMax is omitted, a latitude of /2 is mapped to the top edge of the polygon mesh for the entire sphere (when viewed from outside the sphere).
YMin The latitude of the bottom edge of the portion of the polygon mesh you want to use (where on the sphere the polygon mesh is to be extracted). Should be in the range -/2 to +/2 radians (-90 to +90 degrees). The value is assumed to be in radians unless the Degrees keyword is set.
If YMin is omitted, a latitude of -/2 is mapped to the bottom edge of the polygon mesh for the entire sphere (when viewed from outside the sphere).
To generate the polygons for a portion of a sphere, rather than an entire sphere, use the XMin, XMax, YMin, and YMax keywords. For example, to work with the central portion of the country from a map of the United States, you might use:
XMin=-110, XMax=-100, YMin=35, YMax=45
PRO sphere_demo1
xval = 512 yval = 512 img = BYTARR(xval, yval) OPENR, 1, !Data_Dir + 'mandril.img' READU, 1, img CLOSE, 1 xval = 128 yval = 128 img = REBIN(img, xval, yval)
POLY_SPHERE, 1.0, xval, yval, vertex_list, $ polygon_list
WINDOW, 0, Colors=128 LOADCT, 4 CENTER_VIEW, Ax=(-75.0), Az=(-90.0), Zoom=0.9
TVSCL, POLYSHADE(vertex_list, polygon_list, /T3d, Shade=img)
TVSCL, img
END
grid_demo5
, sphere_demo2
, and sphere_demo3
demonstration programs in:
wavedir/demo/arl
wavedir:[DEMO.ARL]
wavedir\demo\arl
wavedir
is the main PV-WAVE directory.