POLAR_SURFACE

The POLAR_SURFACE function interpolates a surface from polar coordinates (R, Theta, Z) to rectangular coordinates (X, Y, Z). The function returns a two-dimensional array of the same type as Z.

This routine is written in the IDL language. Its source code can be found in the file polar_surface.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = POLAR_SURFACE( Z, R, Theta )

Arguments

Z

An array containing the surface value at each point. If the data are regularly gridded in R and Theta , Z is a two dimensional array, where Zi,j has a radius of Ri and an azimuth of Thetaj . If the data are irregularly-gridded, Ri and Thetai contain the radius and azimuth of each Zi . Note that the ordering of the elements in the array Z is opposite that used by the POLAR_CONTOUR routine.

R

The radius. If the data are regularly gridded in R and Theta , Zi,j has a radius of Ri . If the data are irregularly-gridded, R must have the same number of elements as Z , and contains the radius of each point.

Theta

The azimuth, in radians. If the data are regularly gridded in R and Theta , Zi,j has an azimuth of Thetaj . If the data are irregularly-gridded, Theta must have the same number of elements as Z , and contains the azimuth of each point.

Keywords

GRID

Set this keyword to indicate that Z is regularly gridded in R and Theta .

SPACING

A two element vector containing the desired grid spacing of the resulting array in x and y . If omitted, the grid will be approximately 51 by 51.

BOUNDS

A four element vector, [ x 0 , y 0 , x 1 , y 1 ], containing the limits of the xy grid of the resulting array. If omitted, the extent of input data sets the limits of the grid.

QUINTIC

Set this keyword to use quintic interpolation, which is slower but smoother than the default linear interpolation.

MISSING

Use this keyword to specify a value to use for areas within the grid but not within the convex hull of the data points. The default is 0.0.

Example

R = FINDGEN(50) / 50.0 ; The radius.

THETA = FINDGEN(50) * (2 * !PI / 50.0); Theta.

Z = R # SIN(THETA) ; Make a function (tilted circle).

SURFACE, POLAR_SURFACE(Z, R, THETA, /GRID)
; Show it.

See Also

POLAR Keyword (to PLOT )