Converts polar, cylindrical, or spherical (mathematical or global)coordinates to rectangular coordinates (points).
vec2 A 1D array containing the latitude angles, unless the Polar or Cylin keywords are present and nonzero. If either keyword is specified, then vec2 should contain the radii.
vec3 A 1D array containing the radii for spherical coordinates, unless Polar or Cylin keywords are present and nonzero. If Polar is specified, then vec3 should be the scalar value 0 (it is ignored). If Cylin is specified, then vec3 should contain the z values.
If Polar is zero (or not present), then a FLOAT(3, *) array is returned with (0, *) containing the x-coordinates, (1, *) containing the y-coordinates, and (2, *) containing the z-coordinates.
Degrees If present and nonzero, causes the input coordinates to be in degrees instead of radians.
Global If present and nonzero, causes the input coordinates to be in global longitude and latitude angles. The longitude angles are the horizontal angles on the Earth's globe, where the angles east of the Greenwich meridian are positive, and angles to the west are negative. The latitude angles are vertical angles rotated with respect to the equator. They are positive in the northern hemisphere and negative in the southern hemisphere. By default, the function expects these global latitude and longitude values; this keyword can be used, however, to add clarity to the function call.
Polar Specifies that the input coordinates are polar.
Sphere If present and nonzero, causes the input coordinates to be in a spherical coordinate system where the vertical angle is rotated with respect to the vertical (or polar) axis instead of the horizontal axis. The horizontal angles and radii are the same as in the global spherical case. This system is based on the set of conversion equations in the CRC Standard Mathematical Tables.
PRO vol_demo1
volx = 17 voly = 17 volz = 59
winx = 500 winy = 700
flow_axial = FLTARR(volx, voly, volz) OPENR, 1, !Data_Dir + 'cfd_axial.dat', /Xdr READU, 1, flow_axial CLOSE, 1 flow_radial = FLTARR(volx, voly, volz) OPENR, 1, !Data_Dir + 'cfd_radial.dat', /Xdr READU, 1, flow_radial CLOSE, 1 flow_tangent = FLTARR(volx, voly, volz) OPENR, 1, !Data_Dir + 'cfd_tangent.dat', /Xdr READU, 1, flow_tangent CLOSE, 1
flow_pressure = FLTARR(volx, voly, volz) OPENR, 1, !Data_Dir + 'cfd_pressure.dat', /Xdr READU, 1, flow_pressure CLOSE, 1
points = CONV_TO_RECT(flow_tangent(*), $ flow_radial(*), flow_axial(*), /Cylin, /Degrees)
flow_x = FLTARR(volx, voly, volz) flow_y = FLTARR(volx, voly, volz) flow_z = FLTARR(volx, voly, volz) flow_x(*) = points(0, *) flow_y(*) = points(1, *) flow_z(*) = points(2, *)
T3D, /Reset T3D, Translate=[-0.5, -0.5, -0.5] T3D, Scale=[0.9, 0.9, 0.9] T3D, Rotate=[0.0, 0.0, -30.0] T3D, Rotate=[-60.0, 0.0, 0.0] T3D, Translate=[0.5, 0.5, 0.5]
WINDOW, 0, XSize=winx, YSize=winy, $ XPos=256, YPos=128, Colors=128, $ Title='3D Velocity Vector Field' LOADCT, 4
VECTOR_FIELD3, flow_x, flow_y, flow_z, 1000, $ Max_Length=2.5, Vec_Color=flow_pressure, $ Min_Color=32, Max_Color=127, $ Axis_Color=100, Mark_Symbol=2, $ Mark_Color=90, Mark_Size=0.5, Thick=2
END
vec_demo2
demonstration program in
wavedir/demo/arl
wavedir:[DEMO.ARL]
wavedir\demo\arl
wavedir
is the main PV-WAVE directory.
For more information, see the PV-WAVE User's Guide.