The process of generating is depicted in Fig. 5 and is as follows: first, we calculate the optical properties from the input physical properties using the equations discussed in Sects. 2.1 and 2.2. We then populate a five-dimensional grid of using a matrix expansion of the polynomial coefficients previously stored by the smoothing and compression algorithm discussed immediately above. We populate this grid with a subset of curves containing the closest three library values (in order to perform cubic interpolation) for and , as well as all library values up to and including the maximum desired ratio of . Next, we loop through each of the input wavelengths to compute its specific . In this process, we first integrate over the dimension up to the input sample thickness yielding a four-dimensional grid of . Finally, we do a multidimensional cubic interpolation to find for the values of , , , and at the specified wavelength. Using a 2.5-GHz Intel Core i5-3210M processor, an entire spectrum for a nonabsorbing sample over the range to in steps can be calculated in under 150 ms.