polar.cwp.lib

来自「su 的源代码库」· LIB 代码 · 共 65 行

LIB
65
字号
POLAR - Functions to map data in rectangular coordinates to polar and vise versarecttopolar	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 samplesdx		x sampling intervalfx		first x sampleny		number of y samplesdy		y sampling intervalfy		first y samplep		array[ny][nx] containing samples of p(x,y)na		number of a samplesda		a sampling intervalfa		first a samplenr		number of r samplesdr		r sampling intervalfr		first r sampleOutput:q		array[nr][na] containing samples of q(a,r)polartorect:Input:na		number of a samplesda		a sampling intervalfa		first a samplenr		number of r samplesdr		r sampling intervalfr		first r samplenx		number of x samplesdx		x sampling intervalfx		first x sampleny		number of y samplesdy		y sampling intervalfy		first y sampleq		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) forx and y coordinates not in the range corresponding to nx, dx, ....polartorect:Linear extrapolation is used to determine the value of q(a,r) fora and r coordinates not in the range corresponding to na, da, ....Author:  Dave Hale, Colorado School of Mines, 06/15/90

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?