54 Interface Slope Calculation The first step in calculating the slope of the interface is fitting a polynomial of an appropriate order. A visual inspection of the interface image (Figure 4-11) shows that there are four extremums. Therefore, a polynomial fit of 5th order is chosen as shown in Figure 4-11. This order is chosen to ensure minimal error in the polynomial fit while maintaining a smooth slope. The value of maximum error for possible polynomial fits is tabulated in Table 4-3. Table 4-3 The maximum error between the data and polynomial fit. Polynomial fit order Maximum error (pixels) 3 5.1 4 3.8 5 1.4 6 1.5 7 1.8 8 1.5 -0.7 0. 0. - -- -0 -0 5 - - - - CO r - - - - -r - - - - T - - - - - - - - - - -0.4~~~~~~~~ ~ ~ ~ ~ ~ ~ -I ------ --------- - . --- ----- ----- ----f- F -0.43- F 5 6 7 8 9 10 5 6 7 8 9 10 X inches X inches Figure 4-11 Interface image in world coordinates and corresponding polynomial fit. With the polynomial fit known, the slope of the interface can be calculated by differentiating the expression. The corresponding slope is also shown in Figure 4-12.