POLAR - Functions to map data in rectangular coordinates to polar and vise versa recttopolar convert a function p(x,y) to a function q(a,r) polartorect convert a function q(a,r) to a function p(x,y) Function Prototypes: void recttopolar ( int nx, float dx, float fx, int ny, float dy, float fy, float **p, int na, float da, float fa, int nr, float dr, float fr, float **q); void polartorect ( int na, float da, float fa, int nr, float dr, float fr, float **q, int nx, float dx, float fx, int ny, float dy, float fy, float **p) recttopolar: Input: nx number of x samples dx x sampling interval fx first x sample ny number of y samples dy y sampling interval fy first y sample p array[ny][nx] containing samples of p(x,y) na number of a samples da a sampling interval fa first a sample nr number of r samples dr r sampling interval fr first r sample Output: q array[nr][na] containing samples of q(a,r) polartorect: Input: na number of a samples da a sampling interval fa first a sample nr number of r samples dr r sampling interval fr first r sample nx number of x samples dx x sampling interval fx first x sample ny number of y samples dy y sampling interval fy first y sample q array[nr][na] containing samples of q(a,r) Output: p array[ny][nx] containing samples of p(x,y) Notes: The polar angle a is measured in radians, x = r*cos(a) and y = r*sin(a). recttopolar: Linear extrapolation is used to determine the value of p(x,y) for x and y coordinates not in the range corresponding to nx, dx, .... polartorect: Linear extrapolation is used to determine the value of q(a,r) for a and r coordinates not in the range corresponding to na, da, .... Author: Dave Hale, Colorado School of Mines, 06/15/90