Research Article

Evaluation of Geometrical Modulation Transfer Function in Optical Lens System

Algorithm 2

The refraction algorithm for real ray tracing.
typeLMN RProcess(typeLMN LMN,typeXYZ p,double C,double n,double np,double cosI){
 double cosIp;
 double tmp;
 double K;
 typeLMN LMNp;
 tmp=n/np;
 tmp=1-tmptmp(1-cosIcosI);
 cosIp=sqrt(tmp);
 K=(npcosIp-ncosI)C;
 tmp=nLMN.L-Kp.x;
 LMNp.L=tmp/np;
 tmp=nLMN.M-Kp.y;
 LMNp.M=tmp/np; //
 tmp=nLMN.N-Kp.z+npcosIp-ncosI;
 LMNp.N=tmp/np;
 return LMNp;