The POLAR_SURFACE function interpolates a surface from polar coordinates (R, Theta, Z) to rectangular coordinates (X, Y, 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.

Examples


; Define radius and Theta:
R = FINDGEN(50) / 50.0
THETA = FINDGEN(50) * (2 * !PI / 50.0
; Make a function (tilted circle):
Z = R # SIN(THETA)
; Show it:
SURFACE, POLAR_SURFACE(Z, R, THETA, /GRID)

Syntax


Result = POLAR_SURFACE( Z, R, Theta [, /GRID] [, SPACING=[xspacing, yspacing]] [, BOUNDS=[x0, y0, x1, y1]] [, /QUINTIC] [, MISSING=value] )

Return Value


The function returns a two-dimensional array of the same type as Z.

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, [x0, y0, x1, y1], 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.

Version History


Pre-4.0

Introduced

See Also


POLAR keyword to PLOT