Abstract

This paper presents ray tracing algorithms to evaluate the geometrical modulation transfer function (GMTF) of optical lens system. There are two kinds of ray tracings methods that can be applied to help simulate the point spread function (PSF) in the image plane, for example, paraxial optics and real ray tracings. The paraxial optics ray tracing is used to calculate the first-order properties such as the effective focal length (EFL) and the entrance pupil position through less cost of computation. However, the PSF could have a large tolerance by only using paraxial optics ray tracing for simulation. Some formulas for real ray tracing are applied in the sagittal and tangential line spread function (LSF). The algorithms are developed to demonstrate the simulation of LSF. Finally, the GMTF is evaluated after the fast Fourier transform (FFT) of the LSF.

1. Introduction

Optical products are very popular for people today. The camera function has also been widespread applied for various circumstances [1, 2]. Lens designers encounter more and more challenges for developing a lens with high image quality. Fortunately, advance computer technology can help the designers to simulate and analyze lens systems before implementing a lens. The major concern problem is how to optimize the lens parameters such as curvatures and thicknesses to get high image quality, for example, a high image resolution. Several optimizations have been proposed to improve the aberrations of lens systems [35]. One simulation result, called modulation transfer function (MTF) [68], can be applied to determine the image resolution.

The MTF is the amplitude term of optical transfer function (OTF) that is similar to the transfer function of linear system. The transfer function is regarded as a major characteristic in the linear system. We cannot derive or evaluate the output signal without being given the transfer function. There are some proposals that present their methods to approach the transfer function [911]. A simple one is to receive the impulse response at output as input being an impulse signal. This impulse response is related to the transfer function [10]. Using the same procedure, a point source is respected as the impulse signal to help estimate the image response in a lens system. The image of point source shown in the image plane is called the point spread function (PSF) that is the inverse Fourier transform of the OTF. Therefore, the MTF applied to determine the image resolution can be derived from the amplitude term of the Fourier transform of the PSF.

The MTF can be evaluated from either the geometrical optics or diffraction calculation [12]. Ray tracing methods are widely applied to simulate the image response of object point source in the lens system [12, 13]. Using the irradiance model, Lin and Liu [12] presented a MTF computation method without counting the number of rays traveling to each grid. Tseng et al. [13] proposed skew ray tracing method to simulate the geometrical PSF through a 4 × 4 homogeneous coordinate transformation matrix. In this paper, we describe the relation between the lens system and linear system. Finding the impulse response of the linear system is respected in the lens system to estimate the image response when the object is a point source. The developed algorithm of paraxial optic is used to calculate the first-order optical properties such as effective focal length (EFL) and the position of entrance pupil. An algorithm with real ray tracing method [14, 15] is developed to estimate the image of an object point (i.e., geometrical PSF).

Although the geometrical PSF can be used to determine the system performance, the MTF is always investigated to look into the image resolution of lens system. By the Fourier transform of the geometrical PSF, the MTF can be calculated to analyze the resolution of image in the lens systems. The organization of this paper is as follows. The relation between the lens system and linear system is explained in Section 2. Section 3 presents the ray tracing method for a lens system. The algorithms are developed to simulate a lens system in Section 4. Conclusions are drawn in Section 5.

2. Impulse Response Model of Optical Lens System

The transfer function of a linear system is to represent the relation between input and output signals, as shown in Figure 1. When the signal is input into a linear system with transfer function , the output signal is obtained based on the convolution theorem; that is,Equation (1) is used to evaluate the output signal in the linear system when given the transfer function and the input signal. The OTF of a lens system is similar to the transfer function of linear system. Lens designers usually determine the resolution of designed lens through the amplitude part of the OTF (e.g., MTF). It is important to evaluate the OTF for lens design. The issue is how to investigate the OTF from given lens parameters such as curvatures, thicknesses, and glass refractive indexes.

From the linear system concept, we can obtain the transfer function by replacing the input signal as impulse signal. Even though the transfer function is unknown, the output signal becomes when substituting the signal to the signal into (1). The same procedure allows us to evaluate the OTF for lens systems. In a lens system, the object point (or point source) plays the role like the impulse signal. The image shown in image plane is the impulse response of lens system when the object is a point source. Figure 2 shows the relation between object points and their image responses. In general, the image response depends on the location of object in the lens system. The object point sitting on the optical axis always receives the image response with the spherical aberration. The image response with the coma aberration is always shown in the image plane as the object point at off-axis. Therefore, the OTFs are related to the field of view (FOV). The object points and shown in Figure 2 are located at different FOV, which result in the light propagating to the images and having optical path difference (OPD). The OPD would cause the OTF variation at the image plane. Therefore, lens designers usually investigate three to five FOV OTFs to determine the overall resolution of image. In order to evaluate the OTFs, the ray tracing methods are applied to simulate the image response.

3. Ray Tracing in Optical Lens System

A camera lens is used to catch an object with multiple points into its image plane. Each object point is like a point source to diverge its power toward the outside. In geometrical optics, the direction of wavefront propagation is regarded as the rays. The ray tracing is to investigate how the rays travel from an object point to image plane. There are two processes used in ray tracing, that is, refraction process and transfer process.

3.1. Refraction Process for Paraxial Optics

An optical lens system is usually assembled by multiple lens elements. In order to collect the rays from an object point at image plane, the materials in both sides of a surface must have different refractive indices, which results in the rays deviating at the conjunctive surface. Figure 3 shows an object point at optical axis, ; a ray emerges that propagates from one material with refractive index impinging the spherical surface with center point, , and then is deviated into the other material with refractive . The deviated ray must satisfy Snell’s law; that is, where and are incident and refractive angles, respectively. When the angle is small enough (e.g., °), (2) can be approximated asEquation (3) is called the paraxial approximation.

From the triangles PCA and shown in Figure 3, the geometry gives and . Following the sign convention [16], the incident and refractive angles can be expressed asSubstituting (4a) and (4b) into (3), we obtainUnder the paraxial approximation, we approach . Substituting this approach into (5), we can getEquation (6) is used in refraction process for the paraxial optics. The refractive ray would strike another surface to make the next refraction process. Between two refraction processes, however, the transfer process needs to be investigated to find the height that the ray hits on the next surface.

3.2. Transfer Process for Paraxial Optics

After refraction process, a ray travels from one surface to another surface. There is only one material between two surfaces. Figure 4 shows a ray coming from an object point impinges on the point of the first surface to make the refraction process with the angle . The ray would travel from the point to the point based on the angle . We are interested in the height between the optical axis and the point . In the paraxial approximation, the refraction angle can be expressed asFrom (7b), the is . In general, the lens designer represents a lens system by using the curvature and thickness. Figure 4 shows the thickness between two surfaces is . After some arrangement, we can obtain that the is Equations (6) and (8) are applied to calculate the EFL and pupil position. However, the angles of real rays are usually not small enough to make the paraxial approximation, which results in the fact that we cannot apply the paraxial ray tracing to simulate the spot diagram. Instead, the real ray tracing is used to evaluate the lens performance.

3.3. Real Ray Tracing for Transfer

The common lens system is to employ lens elements with spherical surfaces. Let us discuss a real ray transfer process between spherical surfaces [15]. Figure 5 shows a ray with direction cosine propagates from the front spherical surface to the back spherical surface. The two spherical surfaces have their local coordinate. The point the ray sits on the front surface is . After the ray refracted the point , the ray would arrive at a point of the plane in the coordinate of the back surface. We can find that the point iswhere is the thickness between two spherical surfaces. The transfer process is to find the point that the ray hits the back surface; that is,where will be discussed later.

Figure 6 shows a sphere with the radius . A point lies on the surface of this sphere, and we are interested in the distance from the -axis to the point . From the Pythagorean theorem, we can find the distance aswhere is the radius curvature; for example, . Substituting (10a) and (10b) into (11), we can obtainorwhere we define and . Finally can be found asorEquations (9a) and (9b), (10a), (10b), and (10c), and (15) are used to calculate the point that the ray coming from the front surface arrives at the back surface. Equation (15) is used to develop the algorithm instead of (14). This is due to the fact that the term shown in (14) is much larger than the term . The numerical precision must be satisfied in (14) when running the simulation. If the numerical precision is not large enough, the simulation results will receive much tolerance. Instead of (14), (15) is applied to develop the algorithm for enhancing numerical precision.

3.4. Real Ray Tracing for Refraction

The refraction of real ray tracing follows Snell’s law. Figure 7 shows a ray with incident unit vector respecting the normal line is refracted to the refractive unit vector . Let us represent Snell’s law by the vector cross product form [15]; that is,where and are the unit vectors for the incident and refractive rays, respectively, and is a unit vector to normalize the interface at a point that the ray is refracted. When is made the cross product operator with (16), we can findwhere and are the incident and refractive angles, respectively. When the ray is refracted by a spherical surface, the normal vector can be defined asUsing (17) and (18), we can find the refractive vector . The real ray tracing process is applied to determine the line spread function.

4. Algorithm Development and Simulation Results

A lens system with three lens elements shown in Figure 8 was employed to find its LSF. Table 1 lists the lens parameters. We follow the sign convention in optical design. The distance measured from the vertex of surface to right is positive and conversely it is negative. If the center is located at the right of the surface, the radius is positive; for example, the surface 1 is 22.014. Since the center of surface 2 is located at its left, the radius is negative (e.g., −435.76). So far, the commercial optical software is still expensive so we developed the algorithms that can be used to evaluate the image resolution. Algorithm 1 explains the algorithm of the transfer for real ray tracing method while the algorithm of the refraction is described in Algorithm 2. These two algorithms were based on (9a), (9b), (10a), (10b), and (10c), (13), (15), and (17)-(18). There are 100 thousand rays emerging from the object point to pass through all lens elements into the image plane. Two rays, called marginal rays, from the object point would travel the rim of the entrance pupil. The angle formed by these two marginal rays would be equally divided into 100 thousand parts for initializing the direction cosines of rays for the real ray tracing process. The 100 thousand rays would pass all the lens elements and finally arrive at the image plane.

typeXYZ TProcess(typeXYZ p_1,typeLMN LMN,double d,double C,doublecosI)
 double x0,y0,z0;
 double delta,F,G;
 double tmp;
 typeXYZ p;
 x0=p_1.x+LMN.L/LMN.N(d-p_1.z); //
 y0=p_1.y+LMN.M/LMN.N(d-p_1.z); //
 z0=0;
 F=C(x0x0+y0y0); //
 G=LMN.N-C(LMN.Lx0+LMN.My0); //
 tmp=GG-CF;
cosI=sqrt(tmp); //
 delta=F/(G+cosI); //
 p.x=x0+LMN.Ldelta;     //
 p.y=y0+LMN.Mdelta;   //
 p.z=LMN.Ndelta;   //
 return p;

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;

We collect these tracing rays on image plane to investigate the LSF. Sampling the rays on the image plane can count the number of the rays to imitate the power distribution. The LSP is sampled based on taking units apart to consist of samples so that the total collected space is required asAnd its corresponding discrete frequency domain isThe fast Fourier transform (FFT) will be used to calculate the lens transform function. Therefore, we are concerned about the entire frequency range spanned by the components of the FFT; that is,The MTF in the proposed simulation lens is less than 500 cycles/mm. When is set to 1 mm and is 10000, we can evaluate the MTF with 10000 cycles/mm which is large enough to usual cases. Therefore, the and are set to 1 mm and 10000, respectively. Figure 9 shows the LSF as object point on the optical axis. The tangential and sagittal LSFs with fields 14° and 20° are shown in Figures 10 and 11, respectively. As we can see, the object point placed on the optical axis results in the image spot being symmetrical, making the spherical aberration. The sagittal and tangential images are different when the object point locates at the off-axis, which induces the coma aberration, as shown in Figures 10 and 11. Although the LSFs look very similar in Figures 9, 10(b), and 11(a), the resolutions are very different from the MTFs. Figure 12 shows the MTFs after running the FFT of the LSFs. Figure 13 shows the MTF results from the commercial software Zemax. The MTF shown in Figure 13 is acceptable around 25 cycles/mm, which is the same as the proposed simulation shown in Figure 12. The results shown in Figure 12 have - and -axis. As a result, from Figures 9 and 10, the LSF is symmetrical for -axis while the LSF is asymmetrical for -axis. Therefore, the MTFs are different between -axis and -axis. Besides, the transform function is related to the field angle. These two things make the MTF look very different. The MTF of the field 0° is the worst in Figure 12 due to the fact that the image of point source at field 0° has less power than others at the center of image, which is lower resolution than that of other fields. Figure 10(a) shows the power of the LSF is almost at the image center, resulting in the fact that the greatest MTF is at the -axis of the field 14° to receive the best resolution. As we mentioned early, the OTF is related to the position of object point so that the image responses would be different at the image plane.

5. Conclusions

This paper presents that the transfer function of a lens system is similar to that of a linear system. A transfer function of the linear system can be evaluated through inputting an impulse signal, making the fact that the output would be the transfer function. The same concept of linear system is used to respect a point source at object space as the impulse signal to simulate its response at image space. The paraxial ray tracing is applied to calculate the essential lens properties like the EFL and pupil position. However, the image of a point source would reveal a large tolerance when only using paraxial optics ray tracing for simulation. The real ray tracing method is applied to evaluate the LPF. The algorithms for ray tracing were also developed to simulate the LPF of a lens system. After the FFT process, we can evaluate the MTF to determine the resolution of a lens system.

Conflict of Interests

There is no conflict of interests regarding the publication of this manuscript.