home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat España 21
/
macformat_21.iso
/
Shareware
/
Programación
/
VideoToolbox
/
VideoToolboxSources
/
PupilMTF.c
< prev
next >
Wrap
Text File
|
1995-07-19
|
720b
|
24 lines
/*
PupilMTF.c
Returns the MTF of a circular pupil of specified diameter at a specified spatial frequency,
for incoherent light of a specified wavelength. The answer is exact.
Based on:
Goodman, J. W. (1968) Introduction to Fourier Optics. San Francisco: McGraw-Hill,
page 120, Eq. 6-31.
HISTORY:
7/6/94 dgp wrote it, again.
*/
#include "VideoToolbox.h"
double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm);
double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm)
{
register double cPerDegMax,f,mtf;
cPerDegMax=(PI/180.)*diameterMm*1e-3/(wavelengthNm*1e-9); /* cycles/degree */
f=fabs(cPerDeg)/cPerDegMax;
if(f>=1.)mtf=0.;
else mtf=(2./PI)*(acos(f)-f*sqrt(1-f*f));
return mtf;
}