Abstract:
Improved computation of Fourier coefficients for modeling of 2-D grating diffraction is provided. Let f(x,y) be defined in a region Ω. Typically, f(x,y) is piecewise constant (since it is a grating permittivity or inverse permittivity) and takes on various constant values in several domains in Ω. Let D be one of these domains, having a general shape. According to the invention, D is approximated as a set of trapezoids, and f(x,y) is taken to have a constant value within each of the trapezoids. Since the Fourier coefficient of a constant defined on a trapezoidal region can be analytically evaluated, an analytic approximation to the Fourier coefficient of f(x,y) on D is provided by summing the contributions from each trapezoid.

Description:
FIELD OF THE INVENTION 
   This invention relates to approximate evaluation of integrals, especially in connection with modeling the optical response of a 2-D periodic grating. 
   BACKGROUND 
   Various applications, such as non-contact optical metrology for semiconductor fabrication, require simulation of the optical response of two-dimensional gratings. The rigorous coupled wave analysis (RCWA) is one of the most important methods for such simulations Two-dimensional RCWA simulation has been considered by Soon Ting Han et al., Applied optics, vol. 31, no. 13, 2343-2352, 1992 and by Philippe Lalanne, J. Opt. Soc. Amer. Vol. 14, no. 7, 1592-1598, 1997. Although the RCWA is a powerful technique, the computational speed has been a serious issue, especially for 2D simulations. In an RCWA simulation, a finite number of diffraction orders are included in a calculation. For example, N orders may be included in a 1-D calculation, while NM orders may be included in a 2-D calculation (N orders in one direction and M orders in another direction). Thus 2-D RCWA calculations typically include a much larger number of orders than 1-D calculation, which undesirably increases computation time. 
   Accordingly, methods of reducing RCWA computation time for 2-D calculations are of interest. For example, U.S. patent application Ser. No. 11/305,449 by the present inventors considers symmetric 2-D cases where symmetry-induced relations among the diffraction orders are exploited to reduce computation time. However, further reduction in 2-D RCWA computation time is desirable. 
   In an RCWA calculation, the grating profile is expressed in terms of Fourier coefficients, one coefficient for each retained diffraction order. In the simple case of a grating having rectangular pillars, the Fourier coefficients have simple, well-known analytical expressions. For more complicated grating pillar shapes, standard methods for numerical evaluation of Fourier coefficients are applicable, although they can be time consuming. The time required for calculation of Fourier coefficients tends to be more significant for 2-D gratings, because typically many more Fourier coefficients are needed in a 2-D calculation than in a 1-D calculation. Discussions of the 2-D RCWA in the literature tend to treat the Fourier coefficients of the grating as given quantities (presumably from a numerical integration if necessary), and concentrate on refinements of other steps of the method. For example, Eero Nopomen et al. considers a 2D grating with circular pillars (J. Opt. Soc. Am. A/Vol. 11, No. 9, September 1994), but no details relating to how the Fourier coefficients are obtained is given. 
   Accordingly, it would be an advance in the art to provide an improved method for evaluating 2-D grating Fourier coefficients having reduced computational time requirements. 
   SUMMARY 
   The computation of a Fourier coefficient of a 2-D grating can be formulated as evaluating the Fourier coefficient of a function f(x,y) within a two-dimensional region Ω. General purpose methods for evaluating such coefficients for arbitrary f(x,y) and arbitrary Ω are well known (e.g., 2-D Gaussian integration) but can be excessively time consuming, as indicated above. In contrast, the invention is based on exploitation of special features of f(x,y) and Ω that are characteristic of the 2-D grating diffraction problem. In particular, f(x,y) is piecewise constant, and it is also helpful that Ω can be selected to have a simple shape. (e.g., a rectangle or a square), since Ω is a grating unit cell. As an example of 2-D piecewise constancy, let Γ be a simple closed curve in Ω, let a 2-D domain D be the interior of Γ, let f(x,y)=f 1  in D and let f(x,y)=f 2  in the part of Ω outside of Γ. Frequently, f 2 =1, which corresponds to a grating where each unit cell includes one Γ-shaped pillar surrounded by air/free space. It is convenient to refer to analogous grating features as pillars even if f 2  differs from 1 (i.e., the pillars are surrounded by a denser medium than air). It is also important to note that a unit cell (i.e., Ω) can include more than one pillar, and such multiple pillars can have the same shape or can have different shapes. 
   Since f(x,y) is piecewise constant, the difficulties in calculating the Fourier coefficients arise entirely from the shape of the pillars. Thus pillars having simple shapes (e.g., rectangular pillars) have Fourier coefficients which are trivial to compute, while pillars having a complicated shape have Fourier coefficients which can be time-consuming to compute with generally applicable methods. The basis of the present invention is to provide an approximate tiling (or subdivision) of a general pillar shape (e.g., a 2-D domain D as above) into N regions R j  (1≦j≦N), such that each region has a trapezoidal shape, and the totality formed by the regions has a shape which is approximately that of the original pillar. Within each trapezoidal region, a constant approximation f j  to f(x,y) is provided. In some cases, no approximation is necessary to provide f j  (e.g., if R j  is entirely inscribed within D). In other cases, providing f j  entails an approximation (e.g., if R j  includes small regions outside D). The Fourier integral of a constant over a trapezoidal region can be evaluated (preferably analytically) to provide regional coefficients F j . The sum of the regional coefficients, F, is then an approximation to the Fourier coefficient of f(x,y) in D. The contribution of the region of Ω outside of Γ to the grating Fourier coefficient is usually straightforward to account for (since the shape of Ω is simple). 
   A conventional numerical evaluation of the Fourier coefficients of f(x,y) would entail a decomposition of Ω into rectangular or square regions, followed by numerical summation. The present invention provides several advantages compared to this conventional approach. The use of a 2-D trapezoidal decomposition as opposed to a rectangular decomposition provides improved fidelity to the pillar shape (e.g., a trapezoidal approximation to F typically requires fewer “pieces” than a rectangular approximation to Γ). Another advantage of the invention is that the Fourier coefficients in each trapezoidal region can be evaluated analytically. A further advantage of the invention is that calculations focus on the pillar(s) as opposed to the entire unit cell Ω. This is particularly noteworthy in cases where a large unit cell Ω includes several identical pillars. Fourier coefficients of such cells can be especially time consuming to compute by conventional methods. Furthermore, most 2-D grating structures have diffraction that is relatively insensitive to minor changes in the shape of the pillars, so errors entailed by the approximations of the present invention tend to be minor. 
   As described in detail below, grating Fourier coefficients for relative permittivity and/or inverse permittivity can be computed by approximating arbitrary pillar shapes with suitably chosen trapezoids. For grating unit cells including two or more identically shaped pillars, computation time can be reduced by performing detailed calculations for only one of the pillars, and accounting for the other identical pillars via inclusion of appropriately phase shifted terms in the approximation. The present invention can also be practiced in combination with symmetry reduction as in the above referenced patent application Ser. No. 11/305,449, to further reduce computation time for 2-D RCWA calculations. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  shows a system suitable for practicing the invention. 
       FIGS. 2   a - b  show trapezoidal cells in accordance with embodiments of the invention. 
       FIG. 3  shows a decomposition of a grating feature into a set of y-axis trapezoids. 
       FIG. 4  shows a decomposition of a grating feature into a set of x-axis trapezoids. 
       FIG. 5  shows a y-axis trapezoid selected to have area equal to the corresponding segment of a grating feature. 
       FIG. 6  is a top view of grating having T-shaped features disposed on a non-rectangular lattice. 
       FIG. 7  shows a T-shaped grating feature having rounded ends. 
       FIG. 8  shows exemplary grating reflectance calculation results in accordance with embodiments of the invention. 
   

   DETAILED DESCRIPTION 
     FIG. 1  shows a system suitable for practicing the invention. An optical source  102  provides optical radiation  106  to a 2-D grating  114  disposed on a substrate  112 . Radiation  108  propagates from the grating and is received by a detector/processor  104 . Radiation  108  can be reflected or transmitted radiation, and can include any number of diffracted orders. Typically, as shown here, radiation  108  is specularly reflected light (i.e., zero-order), and plane  110  is the plane of incidence. Radiation  106  can be at multiple wavelengths (e.g., as provided by a broadband optical source, tunable narrow-band source, etc.). In this case a measured spectral (i.e., wavelength dependent) response of the grating is provided. The system processor provides a corresponding modeled spectral response, having parameters of the grating as adjustable parameters. By fitting the modeled spectral response to the measured spectral response, these grating parameters can be determined. The modeled spectral response can be provided by an RCWA calculation (or by any other method that relies on a computation of grating Fourier coefficients). Alternatively, radiation  106  can have a variable angle of incidence, and grating parameters can be determined by fitting a modeled angular response to a measured angular response. In this case as well, a RCWA calculation can be employed to calculate the modeled angular response. 
   The following description will focus on the computation of grating Fourier coefficients. For simplicity, the grating features are assumed to be z-independent within the grating region, since the extension to z-dependent gratings is given in “Stable implementation of the rigorous coupled-wave analysis for surface-relief gratings: enhanced transmittance matrix approach” by M. G. Moharam et al in J. Opt. Soc. Am. A, vol. 12, no. 5, May 1995, 1077-1086. The extension to z-dependent gratings as described in this article can be practiced in combination with the present invention. In the grating region, the relative permittivity and its inverse can be written as 
                     ɛ   ⁡     (     x   ,   y     )       =       ∑     m   ,   n       ⁢           ⁢       ɛ   mn     ⁢     exp   ⁡     [     j   ⁡     (         mK   x     ⁢   x     +       nK   y     ⁢   y       )       ]             ,           (     1   ⁢   a     )                     ɛ   ⁡     (     x   ,   y     )         -   1       =       ∑     m   ,   n       ⁢           ⁢       a   mn     ⁢     exp   ⁡     [     j   ⁡     (         mK   x     ⁢   x     +       nK   y     ⁢   y       )       ]             ,           (     1   ⁢   b     )               
where K x =2π/Λ x , K y =2π/Λ y , and Λ x , Λ y  are the grating periods in x, y directions respectively. Here ε mn , a mn  are the Fourier coefficients of the relative permittivity and inverse permittivity respectively. The pillar shape is described by the given function ε(x,y). The coefficients ε mn , a mn  can be found from Eqs. 1a-b.
 
   The top view of a exemplary unit cell is shown in  FIG. 2   a , where a trapezoidal pillar is in the region x − &lt;x&lt;x + , y − (x)&lt;y&lt;y + (x). For a binary grating having index n 2  in the pillar and n 1  outside the pillar, Eqs. 1a-b give: 
                     ɛ   mn     -       1       Λ   x     ⁢     Λ   y         ⁢     (         n   2   2     ·     I     A   ,   mn         +       n   1   2     ·     I     B   ,   mn           )         =     {                   n   2   2     -     n   1   2           Λ   x     ⁢     Λ   y         ⁢     I   mn       ,   m   ,     n   ≠   0                       (       n   2   2     -     n   1   2       )     ⁢     A       Λ   x     ⁢     Λ   y           +     n   1   2       ,     m   =     n   =   0                         (     2   ⁢   a     )                 a   mn     =         1       Λ   x     ⁢     Λ   y         ⁢     (         I     A   ,   mn         n   2   2       +       I     B   ,   mn         n   1   2         )       =     {               (       1     n   2   2       -     1     n   1   2         )     ⁢       I   mn         Λ   x     ⁢     Λ   y           ,   m   ,     n   ≠   0                       (       1     n   2   2       -     1     n   1   2         )     ⁢     A       Λ   x     ⁢     Λ   y           +     1     n   1   2         ,     m   =     n   =   0                           (     2   ⁢   b     )               
Here I A,mn , I B,mn  are Fourier integrals within the pillar and outside the pillar respectively, and A is the area of the trapezoid pillar. For m≠0 or n≠0, the Fourier integrals are given by
 
                   I     A   ,   mn       =         ∫     x   -       x   +       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢     ⅆ   x     ⁢       ∫     y     -     (   x   )           y     +     (   x   )           ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y             ==     I   mn               (   3   )                       I     B   ,   mn       =           ∫     -       Λ   x     2           Λ   x     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢     ⅆ   x     ⁢       ∫     -       Λ   y     2           Λ   y     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y             -     I   mn       ==     -     I   mn                                   (   4   )               
The problem of calculating ε mn , a mn  is reduced to finding the integral I mn .
 
   As shown in  FIG. 2   a , the x dependent borders of the trapezoid are linear functions of x: y + (x)=a + x+b + , y_(x)=a_x+b_. For m≠0, n≠0, the integral I mn , as in Eq. 3 can be analytically integrated to give 
                         I   mn     =       ⁢       j     nK   y       ⁢       ∫     x   -       x   +       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢     {       exp   ⁡     [       -   j     ⁢           ⁢       nK   y     ⁡     (         a   +     ⁢   x     +     b   +       )         ]       -                                     ⁢     exp   ⁡     [       -   j     ⁢           ⁢       nK   y     ⁡     (         a   -     ⁢   x     +     b   -       )         ]       ⁢         }     ⁢     ⅆ   x                 =       ⁢         exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢     b   -       )           nK   y     ⁡     (       mK   x     +       nK   y     ⁢     a   -         )         ⁢     {       exp   ⁡     [       -     j   ⁡     (       mK   x     +       nK   y     ⁢     a   -         )         ⁢     x   +       ]       -                           ⁢     exp   ⁡     [       -     j   ⁡     (       mK   x     +       nK   y     ⁢     a   -         )         ⁢     x   -       ]       }     -       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢     b   +       )           nK   y     ⁡     (       mK   x     +       nK   y     ⁢     a   +         )                         ⁢     {       exp   ⁡     [       -     j   ⁡     (       mK   x     +       nK   y     ⁢     a   +         )         ⁢     x   +       ]       -     exp   ⁡     [       -     j   ⁡     (       mK   x     +       nK   y     ⁢     a   +         )         ⁢     x   -       ]         }                   (   5   )               
If m=0 or n=0, it can be written as
 
   
     
       
         
           
             
               
                 
                   I 
                   
                     0 
                     ⁢ 
                     n 
                   
                 
                 = 
                 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               nK 
                               y 
                             
                             ⁢ 
                             
                               b 
                               - 
                             
                           
                           ) 
                         
                       
                       
                         
                           n 
                           2 
                         
                         ⁢ 
                         
                           K 
                           y 
                           2 
                         
                         ⁢ 
                         
                           a 
                           - 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 nK 
                                 y 
                               
                               ⁢ 
                               
                                 a 
                                 - 
                               
                               ⁢ 
                               
                                 x 
                                 + 
                               
                             
                             ) 
                           
                         
                         - 
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 nK 
                                 y 
                               
                               ⁢ 
                               
                                 a 
                                 - 
                               
                               ⁢ 
                               
                                 x 
                                 - 
                               
                             
                             ) 
                           
                         
                       
                       ] 
                     
                   
                   - 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               nK 
                               y 
                             
                             ⁢ 
                             
                               b 
                               + 
                             
                           
                           ) 
                         
                       
                       
                         
                           n 
                           2 
                         
                         ⁢ 
                         
                           K 
                           y 
                           2 
                         
                         ⁢ 
                         
                           a 
                           + 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 nK 
                                 y 
                               
                               ⁢ 
                               
                                 a 
                                 + 
                               
                               ⁢ 
                               
                                 x 
                                 + 
                               
                             
                             ) 
                           
                         
                         - 
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 nK 
                                 y 
                               
                               ⁢ 
                               
                                 a 
                                 + 
                               
                               ⁢ 
                               
                                 x 
                                 - 
                               
                             
                             ) 
                           
                         
                       
                       ] 
                     
                   
                 
               
             
             
               
                 ( 
                 
                   6 
                   ⁢ 
                   a 
                 
                 ) 
               
             
           
           
             
               
                 
                   I 
                   
                     m 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     0 
                   
                 
                 = 
                 
                   
                     j 
                     ⁢ 
                     
                       
                         
                           
                             
                               ( 
                               
                                 
                                   a 
                                   + 
                                 
                                 - 
                                 
                                   a 
                                   - 
                                 
                               
                               ) 
                             
                             ⁢ 
                             
                               x 
                               + 
                             
                           
                           + 
                           
                             b 
                             + 
                           
                           - 
                           
                             b 
                             - 
                           
                         
                         
                           mK 
                           x 
                         
                       
                       [ 
                       
                           
                       
                       ⁢ 
                       
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 x 
                                 + 
                               
                             
                             ) 
                           
                         
                         - 
                         
                           exp 
                           ( 
                           
                               
                           
                           ⁢ 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               x 
                               - 
                             
                           
                           ) 
                         
                       
                       ] 
                     
                   
                   + 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           a 
                           + 
                         
                         + 
                         
                           a 
                           - 
                         
                       
                       
                         
                           m 
                           2 
                         
                         ⁢ 
                         
                           K 
                           x 
                           2 
                         
                       
                     
                     [ 
                     
                         
                     
                     ⁢ 
                     
                       
                         exp 
                         ( 
                         
                             
                         
                         ⁢ 
                         
                           
                             - 
                             j 
                           
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             mK 
                             x 
                           
                           ⁢ 
                           
                             x 
                             + 
                           
                         
                         ) 
                       
                       - 
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               x 
                               - 
                             
                           
                           ) 
                         
                       
                     
                     ] 
                   
                 
               
             
             
               
                 ( 
                 
                   6 
                   ⁢ 
                   b 
                 
                 ) 
               
             
           
         
       
     
   
   Similarly, a trapezoid having edges parallel to the x axis, as in  FIG. 2   b  can be considered. Here the pillar is in the region y − &lt;y&lt;y + , x − (y)&lt;x&lt;x + (y). Eq. (3) can be re-written as 
                   I   mn     =       ∫     y   -       y   +       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y     ⁢       ∫       x   +     ⁡     (   y   )           x   -     ⁡     (   y   )         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢       ⅆ   x     .                     (   7   )               
The y dependent sides of the trapezoid of  FIG. 2   b  are linear functions of y: x + (y)=a + y+b + , x_(y)=a − y+b − . For m≠0, n≠0, Eq. 7 can be integrated analytically as
 
   
     
       
         
           
             
               
                 
                   I 
                   mn 
                 
                 = 
                 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               b 
                               - 
                             
                           
                           ) 
                         
                       
                       
                         
                           mK 
                           x 
                         
                         ⁡ 
                         
                           ( 
                           
                             
                               nK 
                               y 
                             
                             + 
                             
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 - 
                               
                             
                           
                           ) 
                         
                       
                     
                     ⁢ 
                     
                       { 
                       
                         
                           exp 
                           ⁡ 
                           
                             [ 
                             
                               
                                 - 
                                 
                                   j 
                                   ⁡ 
                                   
                                     ( 
                                     
                                       
                                         n 
                                         ⁢ 
                                         
                                             
                                         
                                         ⁢ 
                                         
                                           K 
                                           y 
                                         
                                       
                                       + 
                                       
                                         
                                           mK 
                                           x 
                                         
                                         ⁢ 
                                         
                                           a 
                                           - 
                                         
                                       
                                     
                                     ) 
                                   
                                 
                               
                               ⁢ 
                               
                                 y 
                                 + 
                               
                             
                             ] 
                           
                         
                         - 
                         
                           exp 
                           ⁡ 
                           
                             [ 
                             
                               
                                 - 
                                 
                                   j 
                                   ⁡ 
                                   
                                     ( 
                                     
                                       
                                         nK 
                                         y 
                                       
                                       + 
                                       
                                         
                                           mK 
                                           x 
                                         
                                         ⁢ 
                                         
                                           a 
                                           - 
                                         
                                       
                                     
                                     ) 
                                   
                                 
                               
                               ⁢ 
                               
                                 y 
                                 - 
                               
                             
                             ] 
                           
                         
                       
                       } 
                     
                   
                   - 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               b 
                               + 
                             
                           
                           ) 
                         
                       
                       
                         
                           mK 
                           x 
                         
                         ⁡ 
                         
                           ( 
                           
                             
                               nK 
                               y 
                             
                             + 
                             
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 + 
                               
                             
                           
                           ) 
                         
                       
                     
                     ⁢ 
                     
                       { 
                       
                         
                           exp 
                           ⁡ 
                           
                             [ 
                             
                               
                                 - 
                                 
                                   j 
                                   ⁡ 
                                   
                                     ( 
                                     
                                       
                                         nK 
                                         y 
                                       
                                       + 
                                       
                                         
                                           mK 
                                           x 
                                         
                                         ⁢ 
                                         
                                           a 
                                           + 
                                         
                                       
                                     
                                     ) 
                                   
                                 
                               
                               ⁢ 
                               
                                 y 
                                 + 
                               
                             
                             ] 
                           
                         
                         - 
                         
                           exp 
                           [ 
                           
                             - 
                             
                               j 
                               ( 
                               
                                 
                                   nK 
                                   y 
                                 
                                 + 
                                 
                                   
                                     mK 
                                     x 
                                   
                                   ⁢ 
                                   
                                     a 
                                     + 
                                   
                                   ⁢ 
                                   
                                     y 
                                     - 
                                   
                                 
                               
                               ] 
                             
                           
                           } 
                         
                       
                     
                   
                 
               
             
             
               
                 ( 
                 8 
                 ) 
               
             
           
         
       
     
   
   For m=0, or n=0 
   
     
       
         
           
             
               
                 
                   I 
                   
                     0 
                     ⁢ 
                     n 
                   
                 
                 = 
                 
                   
                     j 
                     
                       nK 
                       y 
                     
                   
                   ⁢ 
                   
                     { 
                     
                       
                         
                           [ 
                           
                             
                               
                                 ( 
                                 
                                   
                                     a 
                                     + 
                                   
                                   - 
                                   
                                     a 
                                     - 
                                   
                                 
                                 ) 
                               
                               ⁢ 
                               
                                 y 
                                 + 
                               
                             
                             + 
                             
                               b 
                               + 
                             
                             - 
                             
                               b 
                               - 
                             
                           
                           ] 
                         
                         ⁢ 
                         
                           exp 
                           ( 
                           
                               
                           
                           ⁢ 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               nK 
                               y 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               y 
                               + 
                             
                           
                           ) 
                         
                       
                       - 
                     
                   
                 
               
             
             
               
                 ( 
                 
                   9 
                   ⁢ 
                   a 
                 
                 ) 
               
             
           
           
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       [ 
                       
                         
                           
                             ( 
                             
                               
                                 a 
                                 + 
                               
                               - 
                               
                                 a 
                                 - 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             y 
                             - 
                           
                         
                         + 
                         
                           b 
                           + 
                         
                         - 
                         
                             
                         
                         ⁢ 
                         
                           b 
                           - 
                         
                       
                       ] 
                     
                     ⁢ 
                     
                       exp 
                       ⁡ 
                       
                         ( 
                         
                           
                             - 
                             j 
                           
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             nK 
                             y 
                           
                           ⁢ 
                           
                             y 
                             + 
                           
                         
                         ) 
                       
                     
                   
                   } 
                 
                 + 
               
             
             
               
                   
               
             
           
           
             
               
                 
                     
                 
                 ⁢ 
                 
                   
                     
                       
                         a 
                         + 
                       
                       + 
                       
                         a 
                         - 
                       
                     
                     
                       
                         n 
                         2 
                       
                       ⁢ 
                       
                         K 
                         y 
                         2 
                       
                     
                   
                   ⁡ 
                   
                     [ 
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               nK 
                               y 
                             
                             ⁢ 
                             
                               y 
                               + 
                             
                           
                           ) 
                         
                       
                       - 
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               nK 
                               y 
                             
                             ⁢ 
                             
                               y 
                               - 
                             
                           
                           ) 
                         
                       
                     
                     ] 
                   
                 
               
             
             
               
                   
               
             
           
           
             
               
                 
                   I 
                   
                     m 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     0 
                   
                 
                 = 
                 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               b 
                               - 
                             
                           
                           ) 
                         
                       
                       
                         
                           n 
                           2 
                         
                         ⁢ 
                         
                           K 
                           y 
                           2 
                         
                         ⁢ 
                         
                           a 
                           - 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 - 
                               
                               ⁢ 
                               
                                 y 
                                 + 
                               
                             
                             ) 
                           
                         
                         - 
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 - 
                               
                               ⁢ 
                               
                                 y 
                                 - 
                               
                             
                             ) 
                           
                         
                       
                       ] 
                     
                   
                   - 
                   
                     
                       
                         exp 
                         ⁡ 
                         
                           ( 
                           
                             
                               - 
                               j 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               mK 
                               x 
                             
                             ⁢ 
                             
                               b 
                               + 
                             
                           
                           ) 
                         
                       
                       
                         
                           m 
                           2 
                         
                         ⁢ 
                         
                           K 
                           x 
                           2 
                         
                         ⁢ 
                         
                           a 
                           + 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 + 
                               
                               ⁢ 
                               
                                 y 
                                 + 
                               
                             
                             ) 
                           
                         
                         - 
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               
                                 - 
                                 j 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               
                                 a 
                                 + 
                               
                               ⁢ 
                               
                                 y 
                                 - 
                               
                             
                             ) 
                           
                         
                       
                       ] 
                     
                   
                 
               
             
             
               
                 ( 
                 
                   9 
                   ⁢ 
                   b 
                 
                 ) 
               
             
           
         
       
     
   
   With these results for I mn , the coefficients ε mn , a mn  for gratings having x-parallel or y-parallel trapezoidal pillars can be determined from Eqs. 2a-4. 
   As indicated above, gratings having pillars with arbitrary shape can be approximated as gratings having trapezoidal pillars. The trapezoidal pillars can approximate the arbitrary shape of the original pillar. Corresponding to the two cases considered above, providing a trapezoidal tiling of a general pillar shape can entail providing a set of y-parallel trapezoids or a set of x-parallel trapezoids. 
     FIG. 3  shows y-parallel trapezoids. Here the variable y is first integrated in the 2D integral. 
                   I   mn     =       ∫     x   -       x   +       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢       ∫       y   -     ⁡     (   x   )           y   +     ⁡     (   x   )         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y     ⁢     ⅆ   x                     (   10   )               
Integration in Eq. 10 can be expressed as the combination of several trapezoidal regions with the bases parallel to the y axis. In the sides of the trapezoids, y i+ (x) and y i− (x) between the points x i−1 , and x i  are linear functions of the variable x, as shown in  FIG. 3 . Then it can be shown as
 
                   I   mn     =         ∑   N       i   =   1       ⁢       I   ‵       i   ,   mn                 (   11   )               
where I i,mn  is the analytical result of the integral for the ith trapezoid. For m≠0 or n≠0, it is shown (as I mn ) in Eqs. 5-6, where x + , x − , a + , a − , b + , b −  are given by x i+ , x i− , a i+ , a i− , b i+ , b i− , as determined by the vertex points of the trapezoids, and N is the number of trapezoids constructed by the N+1 points x i  (i=0, 1, 2 . . . , N). Here ε mn  and a mn  can be found from Eq. 2, where the area A is now the total area of all trapezoids.
 
     FIG. 4  shows x-parallel trapezoids. Here the variable x is integrated first, to express Eq. (10) as 
                   I   mn     =         ∫     y   -       y   +       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢       ∫       x   -     ⁡     (   y   )           x   +     ⁡     (   y   )         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x             =         ∑   N       i   =   1       ⁢     I     i   ,   mn                   (   12   )               
where I i,mn  is the analytical result of the integral for the ith trapezoid as shown in Eqs. 8-9. Here y + , y − , a + , a − , b + , b −  are given by y i+ , y i− , a i+ , a i− , b i+ , b i−  as determined by the vertex points of the trapezoids, and N is the number of trapezoids constructed by the N+1 points y i  (i=0, 1, 2 . . . , N). Here also, ε mn  and a mn  can be found from Eq. 2, where the area A is now the total area of all trapezoids.
 
   In this manner, the problem of evaluating a Fourier coefficient of an arbitrary pillar shape is reduced to evaluating a Fourier coefficient of a trapezoidal approximation to the pillar shape, which can be performed analytically. 
   If the pillars are symmetric about the x axis, it is preferred to employ a set of x-parallel trapezoids where N is even and the trapezoids are symmetrically disposed about the x axis (taken to run through the center of the pillar). Similarly, for pillars which are symmetric about the y axis it is preferred to employ a set of y-parallel trapezoids where N is even and the trapezoids are symmetrically disposed about the y axis (taken to run through the center of the pillar). In either case, the integrals in Eqs. 11 and 12 include equal contributions from symmetrically disposed trapezoids on each side of the relevant symmetry axis. The coefficients ε mn  and a mn  are then given by 
                   ɛ   mn     =     2   ⁢         n   2   2     -     n   1   2           Λ   x     ⁢     Λ   y         ⁢         ∑     N   /   2         i   =   1       ⁢     II     i   ,   mn                   (     13   ⁢   a     )                 a   mn     =       (       1     n   2   2       -     1     n   1   2         )     ⁢     2       Λ   x     ⁢     Λ   y         ⁢         ∑     N   /   2         i   =   1       ⁢     II     i   ,   mn                   (     13   ⁢   b     )               
Here II i,mn  can be found by pairwise summation of the ±x +  and ±x −  terms, which gives (from Eqs. 5 and 8):
 
                   II     i   ,   mn       =       -   2     ⁢   j   ⁢         exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢     b   -       )           nK   y     ⁡     (       mK   x     +       nK   y     ⁢     a   -         )         [         sin   ⁡     (       mK   x     +       nK   y     ⁢     a   -         )       ⁢     x   +       -                 (     14   ⁢   a     )                         ⁢       sin   ⁡     (       mK   x     +       nK   y     ⁢     a   -         )       ⁢     x   -       ]     +                           2   ⁢   j   ⁢         exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢     b   +       )           nK   y     ⁡     (       mK   x     +       nK   y     ⁢     a   +         )         ⁡     [         sin   ⁡     (       mK   x     +       nK   y     ⁢     a   +         )       ⁢     x   +       -     sin   ⁢     (       mK   x     +       nK   y     ⁢     a   +         )     ⁢     x   -         ]                                 II     i   ,   mn       =       -   2     ⁢   j   ⁢         exp   ⁡     (       -   j     ⁢           ⁢     mK   y     ⁢     b   -       )           mK   x     ⁡     (       nK   y     +       mK   x     ⁢     a   -         )         [         sin   ⁡     (       nK   y     +       mK   x     ⁢     a   -         )       ⁢     y   +       -                 (14b)                       ⁢       sin   ⁡     (       nK   y     +       mK   x     ⁢     a   -         )       ⁢     y   -       ]                           2   ⁢   j   ⁢           ⁢         exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢     b   +       )           mK   x     ⁡     (       nK   y     +       mK   x     ⁢     a   +         )         [           ⁢         sin   ⁡     (       nK   y     +       mK   x     ⁢     a   +         )       ⁢     y   +       -       sin   ⁡     (       nK   y     +       mK   x     ⁢     a   _         )       ⁢     y   -         ]                             
for the x dependent and y dependent borders respectively. Here computation time is reduced, since N trapezoids are accounted for by N/2 terms in Eqs. 13.
 
   Furthermore, if the pillars are symmetric with respect to both the x and y axes, the integration I i,mn  in Eq. 13 will be symmetric in both x and y, and it can be expressed as twice of the integration in half region, as in Eqs. 5-6 (or Eqs. 8-9 for the X-Y expression). In this case, the calculation will be even faster. 
   Various approaches can be employed to provide trapezoidal tilings of pillars having a more general shape. Inscribed tilings, equal area tilings, and tilings based on a line simplification algorithm have been considered. 
   In inscribed tilings, the trapezoids are inscribed within the border of the pillar. The position of the N points x i  (or y i ) can be found by the following process. At first, the number of trapezoids N is selected by the user (according to the required precision) with equal steps x i  (i=0, 1 . . . N), and then the two y i (x) (top and bottom borders of the pillar) for each trapezoid are calculated. The area error of each trapezoid can be found. The total area error is the sum of the errors for each trapezoid, since inscribed trapezoids can only be “too small” (as seen on  FIGS. 3 and 4 ). The distribution of x i  can be improved as follows. Select the trapezoid having largest area error (let this trapezoid be trapezoid k). Increase x k−1  and decrease x k , equally, until a local minimum of total area error vs. trapezoid adjustment is reached. Repeat the trapezoid selection and adjusting process until no further improvement in total area error is obtained. In practice, this method is preferably performed automatically by a suitably programmed computer or processor. Once the number and shape of the trapezoids are set, the Fourier coefficients ε mn  and a mn  can be calculated from Eqs. 2, 5-6 (or Eqs. 2, 8-9). Increasing N will improve accuracy. 
   Equal area tilings can be derived from inscribed tilings as shown on  FIG. 5 . At first, the number of trapezoids N is selected by the user (according to the required precision) with equal steps x i  (i=0, 1 . . . N), and then the two y i  for each trapezoid are calculated. Here the y i (x) are obtained by starting with the y i (x) obtained from an inscribed tiling (solid lines on  FIG. 5 ) and shifting these linear functions vertically so that each trapezoid has area equal to the corresponding “strip” of the pillar. The equal area y i (x) (dashed lines on  FIG. 5 ) are parallel to the corresponding inscribed y i (x). The total error in this case is defined by 
             S   =         ∑   N       i   =   1       ⁢     max   ⁢          y   -           y   i     -     y     i   -   1             x   i     -     x     i   -   1           ⁢   x                  ,       (       x     i   -   1       &lt;   x   &lt;     x   i       )     .           
The area error is zero by construction for this case.
 
   The distribution of x i  can be improved as follows. Select the trapezoid having largest contribution to S (let this trapezoid be trapezoid k). Increase x k−1  and decrease x k  until S reaches a local minimum with respect to trapezoid adjustment. Repeat the selection and adjusting until S cannot be decreased any more. This method is also preferably implemented by a suitably programmed computer or processor. When the number, position and shape of all trapezoids are set, the Fourier coefficients ε mn  and a mn  can be calculated from Eqs. 2, 5-6 (or Eqs. 2, 8-9). Increasing N increases accuracy. 
   Another approach for generating trapezoidal tilings is to employ a line simplification algorithm. In particular, let a pillar be defined by a general curve Γ. Line simplification algorithms (e.g., the Douglas-Peucker Line-Simplification Algorithm) provide an approximation to Γ with a set of connected line segments, e.g., as described in “Speeding up the Douglas-Peucker Line-Simplification Algorithm” by John Hershberger and Jack Snoeyink, in Proc. 5th Intl. Symp. Spatial Data Handling, IGU Commission on GIS, pages 134-143, 1992. In this approach, a maximum error in y (or x for trapezoids parallel to x) Δ is set by the user at first, and a small number(N=2 or 3) of vertex points x i , y i  with equal separation of x is set at the beginning of the process. Then errors 
                 Δ   i     ⁡     (   x   )       =          y   -           y   i     -     y     i   -   1             x   i     -     x     i   -   1           ⁢   x              ,     (       x     i   -   1       &lt;   x   &lt;     x   i       )           
are calculated. If the largest error of the Δ i (x) is larger than Δ, split the corresponding segment into two with the new vertex point (i.e., new x i ) set at the largest error point. This process can be continued until sufficient accuracy is obtained. Each new x i  will typically provide two new trapezoid vertices, corresponding to y − (x i ) and y + (x i ).
 
   There are different advantages for the above three approaches. The first two approaches provide a very good convergence rate, which can be beneficial for complicated pillar shapes. However, determining the vertex points of the trapezoids can be complicated, especially for the second approach (i.e., equal area). The line-simplification approach provides a powerful and general way to select the trapezoids, in which a precision can be set by the user as opposed to setting the number of trapezoids in advance. Although the preceding examples considered y-parallel trapezoids (e.g., as in  FIG. 3 ), all three methods are equally applicable to x-parallel trapezoids (e.g., as in  FIG. 4 ). 
   The invention is also applicable in cases where a grating unit cell includes more than one pillar. For example, a unit cell having several pillars each with index n 2  leads to the following generalization of Eq. 3 
                     I     1   ,   mn       =           ∑   p       j   =   1       ⁢     [       ∫     x     j   -         x     j   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫       y     j   -       ⁡     (   x   )         y     j   +     (   x   )           ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y             ]       ==     I   mn         ,           (   15   )               
where p is the number of pillars in the unit cell. For each pillar j, the integral can be found as described above (i.e., each pillar can be separately approximated by a trapezoidal tiling). Then the Fourier coefficients of relative permittivity and inverse permittivity can be found by adding the contributions of each pillar.
 
   The case where multiple pillars have the same shape and orientation is important in engineering practice. For example, suppose two such pillars are present. For this case, Eq. 15 gives 
                   I     1   ,   mn       =         ∫     x     1   -         x     1   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫     y     1   -         y     1   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y             +       ∫     x     2   -         x     2   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫     y     2   -         y     2   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y                       (   16   )               
We assume pillar  2  is offset from pillar  1  by an offset (D x ,D y ), which gives x 2− =x 1− +D x , x 2+ =x 1+ +D x , y 2− =y 1− +D y , y 2+ =y 1+ +D y  in Eq. 16. Simplification of Eq. 16 gives
 
                   I     1   ,   mn       =       {     1   +     exp   ⁡     [       -   j2     ⁢           ⁢     π   ⁡     (         m   ⁢           ⁢     D   x         Λ   x       +       nD   y       Λ   y         )         ]         }     ⁢           ⁢       ∫     x     1   -         x     1   +         ⁢       exp   (           ⁢       -   j     ⁢           ⁢     mK   x     ⁢   x     )     ⁢           ⁢     ⅆ           ⁢   x     ⁢           ⁢       ∫     y     1   -         y     1   +         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢       ⅆ   y     .                       (   17   )               
Thus calculations only need to be performed for one of the pillars since contributions of other pillars having the same shape can be accounted for with an appropriate phase-shift. This phase shift approach is applicable to any number of pillars having the same shape and orientation.
 
   The preceding description has considered gratings having orthogonal unit cells (i.e., unit cells which are rectangular or square). If a grating has an orthogonal lattice (i.e., the lattice translation vectors defining the lattice periodicity are orthogonal), the lattice primitive unit cell is orthogonal, and the preceding description is directly applicable to the primitive grating unit cell. Here a primitive unit cell is a cell having minimal area that can be repeated to form the grating. Gratings can also have non-orthogonal lattices (e.g., a hexagonal lattice), as shown on  FIG. 6 . 
   Grating diffraction calculations can be reformulated to accommodate non-orthogonal gratings, e.g., as considered by Lifeng Li, J. Opt. Soc. Am. A/vol. 14, no. 10, 2758-2767, 1997. In practicing the invention for non-orthogonal gratings, an alternative approach is preferred. More specifically, a non-primitive orthogonal unit cell is selected for the grating. Computations can then proceed as described above. In the example of  FIG. 6 , the non-primitive orthogonal unit cell is shown as  612 . Cell  612  includes all of pillar  610 , and parts of pillars  602 ,  604 ,  606 , and  608 . Effectively, cell  612  includes two instances of the T-shaped pillar. In contrast, a primitive unit cell for the example of  FIG. 6  would include only one instance of the T-shaped pillar, but since the primitive cell is hexagonal, computations in terms of the primitive unit cell would be more complicated. Here a non-primitive unit cell is a cell having larger area than primitive unit cell that can also be repeated to form the grating. 
   The T-shaped pillar is modeled as two rectangles (which is a special case of the trapezoidal decomposition described above). The integral of pillar  610  located in the center of cell  612  is given by 
                   I     10   ,   mn       =         ∫       l   x     2         l   x     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫       l   y     2         l   y     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y             +       ∫       l   x     2           l   x     2     +     w   x         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫       w   y     2         w   y     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y                       (   18   )               
The integral of the second pillar can be related to the result of Eq. 18 by a phase shift of exp[−j(mK x Δx+nK y Δy)]. The pieces of pillars  602 ,  604 ,  606 , and  608  located in the four corners of unit cell  612  act as a single pillar laterally shifted from pillar  610  by (Λ x /2,Λ y /2). From Eq. 17, the whole integral in a unit cell can be written as
   I   l,mn =[1+(−1) m+n   ]·I   10,mn    (19) 
   For m≠0 or n≠0, evaluation of Eq. 18 gives 
                   I     10   ,   mn       =           Λ   x     ⁢     Λ   y         mn   ⁢           ⁢   π       ⁢     {         sin   ⁡     (     m   ⁢           ⁢   π   ⁢       l   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢           ⁢       l   y       Λ   y         )         +       exp   ⁡     [       -   j     ⁢           ⁢   m   ⁢           ⁢     π   ⁡     (         l   x       Λ   x       +     w   x       )         ]       ⁢     sin   ⁡     (     m   ⁢           ⁢   π   ⁢       w   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢       w   y       Λ   y         )           ]               (   20   )               
For odd m+n, I 1,mn =0, and for even m+n, I 1,mn =2I 10,mn  and I 2,mn =−I 1,mn  for a binary grating. Combining results, the permittivity Fourier coefficients are given by
 
                         ɛ   mn     =       ⁢         1       Λ   x     ⁢     Λ   y         ⁢     (         n   2   2     ·     I     1   ,   mn         +       n   1   2     ·     I     2   ,   mn           )       =           n   2   2     -     n   1   2           Λ   x     ⁢     Λ   y         ⁢     I     1   ,   mn                       =       ⁢         2   ⁢     (       n   2   2     -     n   1   2       )         mn   ⁢           ⁢   π       ⁢     {         sin   ⁡     (     m   ⁢           ⁢   π   ⁢       l   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢       l   y       Λ   y         )         +                         ⁢       exp   ⁡     [       -   j     ⁢           ⁢   m   ⁢           ⁢     π   ⁡     (         l   x       Λ   x       +     w   x       )         ]       ⁢     sin   ⁡     (     m   ⁢           ⁢   π   ⁢       w   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢       w   y       Λ   y         )         }                 (   21   )               
for even m+n, and ε mn =0 for odd m+n. The a mn  can be found similarly. For m=n=0, ε mn , a mn  can be found from Eq. 2 with A replaced by the total area of all pillars in an unit cell.
 
     FIG. 7  shows a T-shape pillar having rounded ends. The following description is an example of how Fourier coefficients of a non-orthogonal grating (as in  FIG. 6 ) having the pillars of  FIG. 7  can be obtained in accordance with principles of the invention. The unit cell geometry is as on  FIG. 6  (i.e., cell dimensions are Λ x , Λ y  in x, y directions respectively). The radii of the half circles at the end of the T-shape of  FIG. 7  are r x =l x /2, and r y =w y /2 as shown. Eq. 18 gives 
                   I     10   ,   mn       =         ∫     -       l   x     2           l   x     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫       -         r   x   2     -     x   2           -       l   y     2               r   x   2     -     x   2         +       l   y     2         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y             +             (   22   )                       ⁢       ∫       l   x     2           l   x     2     +     w   x     +         r   y   2     -     y   2             ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢     ⅆ   x     ⁢       ∫     -       w   y     2           w   y     2       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     nK   y     ⁢   y     )       ⁢     ⅆ   y                                     
which can further be written as
 
                   I     10   ,   mn       =         ∫     -       l   x     2           l   x     2       ⁢       cos   ⁡     (       mK   x     ⁢   x     )       ⁢       ∫     -       l   y     2           l   y     2       ⁢       cos   ⁡     (       nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y     ⁢           ⁢     ⅆ   x             +     2   ⁢       ∫       l   y     2           l   y     2     +     r   x         ⁢       cos   ⁡     (       nK   y     ⁢   y     )       ⁢       ∫     -         r   x   2     -     y   2                 r   x   2     -     y   2           ⁢       cos   ⁡     (       mK   x     ⁢   x     )       ⁢           ⁢     ⅆ   x     ⁢     ⅆ   y               +       ∫     -       w   y     2           w   y     2       ⁢       cos   ⁡     (       nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y     ⁢       ∫       l   x     2           l   x     2     +     w   x         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢     ⅆ   x             +       ∫     r     x   +     w   x             r   x     +     w   x     +     r   y         ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢           ⁢       ∫     -         r   y   2     -     x   2                 r   y   2     -     x   2           ⁢       cos   ⁡     (       nK   y     ⁢   y     )       ⁢           ⁢     ⅆ   y     ⁢     ⅆ   x                       (   23   )               
Here the first and third integrals are analytically integrable. The second and fourth integrals can be approximated as described above with y-parallel and x-parallel trapezoids respectively.
 
   For m≠0, n≠0, a number of trapezoids N can be selected to determine x i , y i  in the second and fourth integrals in Eq. 23. From Eqs. 5-6, 8-9, Eq. 23 can be re-written as 
                     I     10   ,   mn       =       I     0   ,   mn       +         2   ⁢     Λ   x         m   ⁢           ⁢   π       ⁢       ∑     i   =   1     N`     ⁢           ⁢       ∫     y     i   -   1         y   i       ⁢       cos   ⁡     (       nK   y     ⁢   y     )       ⁢   sin   ⁢     {       mK   x     ⁡     [         k   yi     ⁡     (     y   -     y   i       )       +           ⁢         r   2     -     y   i   2           ]       }     ⁢     ⅆ   y             +         Λ   y       n   ⁢           ⁢   π       ⁢       ∑     i   =   1     N     ⁢           ⁢       ∫     x     i   -   1         x   i       ⁢       exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁢   sin   ⁢     {       nK   y     ⁡     [         k   xi     ⁡     (     x   -     x   i       )       +         r   2     -     x   i   2           ]       }     ⁢           ⁢     ⅆ   x                 ⁢     
     ⁢   where           (   24   )                   k   xi     =             r   2     -     x   i   2         -         r   2     -     x     i   -   1     2               x   i     -     x     i   -   1             ,           ⁢       k   yi     =               r   2     -     y   i   2         -         r   2     -     y     i   -   1     2               y   i     -     y     i   -   1           .               (   25   )               
Here
 
                   
     ⁢       I     0   ,   mn       =           Λ   x     ⁢     Λ   y         mn   ⁢           ⁢     π   2         ⁡     [         sin   ⁡     (     m   ⁢           ⁢   π   ⁢       l   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢       l   y       Λ   y         )         +       exp   ⁡     [       -   j     ⁢           ⁢     (       l   x     +     w   x       )     ⁢       m   ⁢           ⁢   π       Λ   x         ]       ⁢     sin   ⁡     (     m   ⁢           ⁢   π   ⁢       w   x       Λ   x         )       ⁢     sin   ⁡     (     n   ⁢           ⁢   π   ⁢       w   y       Λ   y         )           ]                 (   26   )               
is the sum of the first and third integrals in Eq. 23. Eq. (24) can further be integrated as
 
                   I     10   ,   mn       =       I     0   ,   mn       -         Λ   x       m   ⁢           ⁢   π       ⁢     I     a   ,   mn         -         Λ   y       n   ⁢           ⁢   π       ⁢     I     b   ,   mn                   (   27   )               
where
 
                   I     a   ,   mn       =         ∑     i   =   1     N     ⁢           ⁢     {         cos   [         (         mK   x     ⁢     k   yi       +     nK   y       )     ⁢   y     +     C   m               mK   x     ⁢     k   yi       +     nK   y         +       cos   ⁡     [         (         mK   x     ⁢     k   yi       -     nK   y       )     ⁢   y     +     C   m       ]             mK   x     ⁢     k   yi       -     nK   y           }       ⁢     ❘     y     i   -   1         y   i                 (     28   ⁢   a     )                 I     b   ,   mn       =         ∑     i   =   1     N     ⁢           ⁢     {         exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )             (       nK   y     ⁢     k   xi       )     2     -       m   2     ⁢     K   x   2           [           ⁢       j   ⁢           ⁢       m   ⁢           ⁢     Λ   y         n   ⁢           ⁢     Λ   x     ⁢     k   xi         ⁢     sin   ⁡     (         nK   x     ⁢     k   xi     ⁢   x     +     C   n       )         +     cos   ⁡     (         nK   x     ⁢     k   xi       +     C   n       )         ]     }       ⁢     ❘     x     i   -   1         x   i                 (     28   ⁢   b     )               
and
   C   m   =−mK   x   k   yi   y   i +√{square root over ( r   2   −y   i   2 )},  C   n   =−nK   y   k   xi   x   i +√{square root over ( r   2   −x   i   2 )}.  (29) 
   If (mK x k yi ) 2 =(nK y ) 2  in any one of the trapezoids, the corresponding term in I a,mn  in Eq. 28a can be written as 
                   I     a   ,   mn       =     {               [         cos   ⁡     (       2   ⁢     nK   y     ⁢   y     +     C   m       )         2   ⁢     nK   y         -     y   ⁢           ⁢   sin   ⁢           ⁢     C   m         ]     ⁢     ❘     y     i   -   1         y   i         ,         mK   x     ⁢     k   yi       =     nK   y                       -     [       y   ⁢           ⁢   sin   ⁢           ⁢     C   m       +       cos   ⁡     (       C   m     -     2   ⁢     nK   y     ⁢   y       )         2   ⁢     nK   y           ]       ⁢     ❘     y     i   -   1         y   i         ,         mK   x     ⁢     k   yi       =     -     nK   y                           (   30   )               
Similarly, if (nK y k xi ) 2 =(mK x ) 2  in any one of the trapezoids, the corresponding term in I b,mn  in Eq. 28b can be written as
 
   
     
       
         
           
             
               
                 
                   I 
                   
                     b 
                     , 
                     mn 
                   
                 
                 = 
                 
                   
                     [ 
                     
                       
                         
                           - 
                           j 
                         
                         ⁢ 
                         
                           
                             
                               
                                 mK 
                                 x 
                               
                               ⁢ 
                               x 
                             
                             + 
                             
                               C 
                               n 
                             
                           
                           
                             2 
                             ⁢ 
                             
                               mK 
                               x 
                             
                           
                         
                         ⁢ 
                         
                           exp 
                           ⁡ 
                           
                             ( 
                             
                               ⅈ 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 C 
                                 n 
                               
                             
                             ) 
                           
                         
                       
                       - 
                       
                         
                           exp 
                           ⁡ 
                           
                             [ 
                             
                               - 
                               
                                 j 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       2 
                                       ⁢ 
                                       
                                         mK 
                                         x 
                                       
                                       ⁢ 
                                       x 
                                     
                                     - 
                                     
                                       C 
                                       n 
                                     
                                   
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                         
                           4 
                           ⁢ 
                           
                             mK 
                             x 
                           
                         
                       
                     
                     ] 
                   
                   ⁢ 
                   
                     ❘ 
                     
                       x 
                       
                         i 
                         - 
                         1 
                       
                     
                     
                       x 
                       i 
                     
                   
                 
               
             
             
               
                 ( 
                 31 
                 ) 
               
             
           
         
       
     
   
   From Eqs. 2-4, and 19, we have, for m or n≠0, 
                   ɛ   mn     =             n   2   2     -     n   1   2           Λ   x     ⁢     Λ   y         ⁢     I     1   ,   mn         =     {                   0   ,               m   +   n     =       2   ⁢   k     -   1       ,             k   =   1     ,   2   ,     3   ⁢           ⁢   …             ⁢                               2   ⁢         n   2   2     -     n   1   2           Λ   x     ⁢     Λ   y         ⁢     I     10   ,   mn         ,               m   +   n     =     2   ⁢   k       ,             k   =   1     ,   2   ,     3   ⁢           ⁢   …                               (     32   ⁢   a     )                 a   mn     =         (       1     n   2   2       -     1     n   1   2         )     ⁢       I     1   ,   mn           Λ   x     ⁢     Λ   y           =     {                 0   ,               m   +   n     =       2   ⁢   k     -   1       ,             k   =   1     ,   2   ,     3   ⁢           ⁢   …                                 (       1     n   2   2       -     1     n   1   2         )     ⁢       2   ⁢     I     10   ,   mn             Λ   x     ⁢     Λ   y           ,               m   +   n     =     2   ⁢   k       ,             k   =   1     ,   2   ,     3   ⁢           ⁢   …                               (     32   ⁢   b     )               
where I 10,mn  can be found from Eqs. 27-31.
 
   For m=n=0, Eq. 22 gives 
                               I     10   ,   00       =       ⁢         ∫     -       I   x     2           I   x     2       ⁢       (       2   ⁢               ⁢       r   x   2     -     x   2             +     l   y       )     ⁢     ⅆ   x         +       ∫     -       w   y     2           w   y     2       ⁢       (       w   x     +         r   y   2     -     y   2           )     ⁢     ⅆ   y                       =       ⁢         l   x     ⁢     l   y       +       w   x     ⁢     w   y       +       π   2     ⁢     (       2   ⁢     r   x   2       +     r   y   2       )                       (   33   )                 
and from Eq. 2, the coefficients are given by
 
   
     
       
         
             
           
             
               
                 
                   
                     ɛ 
                     00 
                   
                   = 
                   
                     
                       2 
                       ⁢ 
                       
                         
                           
                             
                               n 
                               2 
                               2 
                             
                             - 
                             
                               n 
                               1 
                               2 
                             
                           
                           
                             
                               Λ 
                               x 
                             
                             ⁢ 
                             
                               Λ 
                               y 
                             
                           
                         
                         ⁡ 
                         
                           [ 
                           
                             
                               
                                 l 
                                 x 
                               
                               ⁢ 
                               
                                 l 
                                 y 
                               
                             
                             + 
                             
                               
                                 w 
                                 x 
                               
                               ⁢ 
                               
                                 w 
                                 y 
                               
                             
                             + 
                             
                               
                                 π 
                                 2 
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   
                                     2 
                                     ⁢ 
                                     
                                       r 
                                       x 
                                       2 
                                     
                                   
                                   + 
                                   
                                     r 
                                     y 
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                           ] 
                         
                       
                     
                     + 
                     
                       n 
                       1 
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   
                     34 
                     ⁢ 
                     a 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     a 
                     00 
                   
                   = 
                   
                     
                       
                         ( 
                         
                           
                             1 
                             
                               n 
                               2 
                               2 
                             
                           
                           - 
                           
                             1 
                             
                               n 
                               1 
                               2 
                             
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         
                           2 
                           
                             
                               Λ 
                               x 
                             
                             ⁢ 
                             
                               Λ 
                               y 
                             
                           
                         
                         ⁡ 
                         
                           [ 
                           
                             
                               
                                 l 
                                 x 
                               
                               ⁢ 
                               
                                 l 
                                 y 
                               
                             
                             + 
                             
                               
                                 w 
                                 x 
                               
                               ⁢ 
                               
                                 w 
                                 y 
                               
                             
                             + 
                             
                               
                                 π 
                                 2 
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   
                                     2 
                                     ⁢ 
                                     
                                       r 
                                       x 
                                       2 
                                     
                                   
                                   + 
                                   
                                     r 
                                     y 
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                           ] 
                         
                       
                     
                     + 
                     
                       1 
                       
                         n 
                         1 
                         2 
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     34 
                     ⁢ 
                     b 
                   
                   ) 
                 
               
             
           
         
       
     
   
   For m=0, Eq. 23 gives 
                   I     10   ,     0   ⁢   n         =           Λ   y       n   ⁢           ⁢   π       ⁢     (         l   x     ⁢   sin   ⁢       n   ⁢           ⁢   π   ⁢           ⁢     l   y         Λ   y         +       w   x     ⁢   sin   ⁢       n   ⁢           ⁢   π   ⁢           ⁢     w   y         Λ   y           )       +     4   ⁢       ∑     i   =   1     N     ⁢       ∫     y     i   -   1         y   i       ⁢         cos   ⁡     (       nK   y     ⁢   y     )       ⁡     [         k   yi     ⁡     (     y   -     y   i       )       +         r   x   2     -     y   i   2           ]       ⁢     ⅆ   y             +         Λ   y       n   ⁢           ⁢   π       ⁢       ∑     i   =   1     N     ⁢       ∫     x     i   -   1         x   i       ⁢     sin   ⁢     {       nK   y     ⁡     [         k   xi     ⁡     (     x   -     x   i       )       +         r   x   2     -     x   i   2           ]       }     ⁢     ⅆ   x                       (   35   )               
which can be further integrated as
 
                   I     10.0   ⁢   n       =             Λ   y       n   ⁢           ⁢   π       ⁢     (         l   x     ⁢   sin   ⁢           ⁢       n   ⁢           ⁢   π   ⁢           ⁢     l   y         Λ   y         +       w   x     ⁢   sin   ⁢           ⁢       n   ⁢           ⁢     πw   y         Λ   y           )       +         2   ⁢     Λ   y         n   ⁢           ⁢   π       ⁢       ∑     i   =   1     N     ⁢     [         (         k   yi     ⁢   y     +     C     0   ⁢   n         )     ⁢     sin   ⁡     (       nK   y     ⁢   y     )         -           Λ   y     ⁢     k   yi         2   ⁢   n   ⁢           ⁢   π       ⁢     cos   ⁡     (       nK   y     ⁢   y     )           ]           ⁢     ❘     y     i   -   1         y   i       ⁢         +       Λ   y   2       2   ⁢     n   2     ⁢     π   2           ⁢       ∑     i   =   1     N     ⁢       k   xi     ⁢   cos   ⁢     {       nK   y     ⁡     [         k   xi     ⁡     (     x   -     x   i       )       +         r   x   2     -     x   i   2           ]       }           ⁢     |     x     i   -   1         x   i                   (   36   )               
where
   C   0n   =−k   yi   y   i +√{square root over ( r   2   −y   i   2 )}  (37) 
The coefficients ε 0n , a 0n  can then be found from Eq. 32 by setting m=0.
 
   For n=0, Eq. 23 gives 
                   I       1   ⁢           ⁢   0     ,     m   ⁢           ⁢   0         =       I     0   ,     m   ⁢           ⁢   0         +         2   ⁢     Λ   x         m   ⁢           ⁢   π       ⁢       ∑     i   =   1     N     ⁢       ∫     y     i   -   1         y   i       ⁢     sin   ⁢     {       mK   x     ⁡     [         k   yi     ⁡     (     y   -     y   i       )       +         r   2     -     y   i   2           ]       }     ⁢     ⅆ   y             +     2   ⁢       ∑     i   =   1     N     ⁢       ∫     x     i   -   1         x   i       ⁢         exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )       ⁡     [         k   xi     ⁡     (     x   -     x   i       )       +         r   2     -     x   i   2           ]       ⁢     ⅆ   x                       (   38   )               
where
 
                   I     0.   ⁢   m   ⁢           ⁢   0       =         Λ   x       m   ⁢           ⁢   π       ⁢       {         l   y     ⁢   sin   ⁢           ⁢       m   ⁢           ⁢   π   ⁢           ⁢     l   x         Λ   x         +       w   y     ⁢     exp   ⁡     [       -     j   ⁡     (       l   x     +     w   y       )         ⁢       m   ⁢           ⁢   π       Λ   x         ]       ⁢   sin   ⁢           ⁢       m   ⁢           ⁢     πw   y         Λ   y           }     .               (   39   )               
Eq. 38 can further be integrated as
 
                   I     10   ,   mn       =         I     0   ,   m0       -         Λ   x   2         m   2     ⁢     π   2         ⁢       ∑     i   =   1     N     ⁢       k   yi     ⁢   cos   ⁢     {       mK   x     ⁡     [         k   yi     ⁡     (     y   -     y   i       )       +         r   2     -     y   i   2           ]       }             ⁢     |     y     i   -   1         y   i       ⁢       +       j   ⁢           ⁢     Λ   x         m   ⁢           ⁢   π         ⁢       ∑     i   =   1     N     ⁢     {         [         k   xi     ⁡     (     x   -     x   i       )       +         r   2     -     x   i   2           ]     ⁢     exp   ⁡     (       -     jmK   x       ⁢   x     )         -         j   ⁢           ⁢     Λ   x     ⁢     k   xi         2   ⁢   m   ⁢           ⁢   π       ⁢     exp   ⁡     (       -   j     ⁢           ⁢     mK   x     ⁢   x     )           }         ⁢     |     x     i   -   1         x   i                 (   40   )               
The coefficients ε m0 , a m0  can then be found from Eq. 32 by setting n=0.
 
   The preceding description shows how the Fourier coefficients ε mn , a mn  can be obtained in this example (i.e., from Eqs. 27-31, 34, 35-37, and 38-40, in combination with Eq. 32). Once the Fourier coefficients are available, RCWA diffraction calculations can be performed (e.g., to calculate reflectance as a function of wavelength for comparison to a measured spectral reflectance). 
   As indicated above, when the invention is applied to a grating having a non-orthogonal lattice, an orthogonal non-primitive unit cell is employed for the calculations. Such a non-primitive unit cell is larger than a primitive unit cell. More specifically, a non-primitive unit cell has an area which is an integer multiple (2 or more) of the unit cell area. In the example of  FIGS. 6 and 7 , the orthogonal unit cell employed has twice the area of the primitive unit cell. However, increasing the unit cell area leads to increased computation time in an RCWA, since the number of diffraction orders that must be retained for a given level of accuracy tends to be proportional to unit cell area. 
   Thus in cases where the grating has a reflection symmetry plane, it is particularly preferred to illuminate the grating such that the plane of incidence (e.g.,  110  on  FIG. 1 ) is parallel to or coincides with the grating symmetry plane, as shown on  FIG. 1 . In such cases, a symmetry-reduced 2-D RCWA calculation can be employed, as described in U.S. patent application Ser. No. 11/305,449 by the present inventors. Such symmetry reduction is especially beneficial in connection with gratings having non-orthogonal lattices, since the undesirable effect of increasing unit cell area can be compensated for. 
     FIG. 8  shows calculated reflectance results from examples of the invention. Curve  802  (solid line) shows calculated zero-order reflectance for a grating having the T-shaped pillars of  FIG. 7  and the non-orthogonal lattice of  FIG. 6 . Grating Fourier coefficients are obtained as described above. The plane of incidence is the x-z plane (as on  FIG. 1 ), with an angle of incidence of 9 degrees. The grating is an SiO 2 /air grating on a quartz substrate having Λ x =Λ y =0.4 μm, d=0.5 μm, l y =0.4Λ y , w x =0.2Λ x , r x =r y =0.1Λ x . Identical results for this grating were obtained with a symmetry-reduced RCWA calculation as described above and with a conventional RCWA calculation. 
   Curve  804  (dashed line) on  FIG. 8  shows calculated reflectance for a grating having circular pillars. The grating and illumination parameters are as described above for curve  802 , except that w x , w y  and l y  are all set to zero, which changes the T-shaped features to circular features. Grating Fourier coefficients are obtained as described above. The diffraction problem for curve  804  is equivalent (i.e., has the same reflectance spectrum) to an SiO 2 /air grating on a quartz substrate having Λ x =Λ y =0.2828 μm and r x =r y =0.141Λ x  with one circular pillar per unit cell that is illuminated at 45 degree conical incidence. This equivalence has been verified by explicit calculations for both cases. The computation time for the large unit cell case is about 60% of the computation time for the equivalent conical incidence case, since the grating is symmetric allowing the use of a symmetry reduced RCWA having reduced matrix size.