以日光为白光光源,把日光光谱均匀分割为若干份色光,计算出各色光的RGB代码。基于Matlab软件编写出白光光栅衍射仿真程序,通过改变可调参数实现白光干涉、衍射实验(包括:光栅衍射、单缝及双缝衍射、双光束及多光束干涉等)的计算机仿真。结果表明,利用2 000份色光仿真白光干涉、衍射实验,图像色彩细腻而与实际实验的结果一致,并能直接投影于多媒体屏幕上,可应用于光学计算机辅助教学及光谱研究等领域。
Taking sunlight as white light source, sunlight spectrum is divided into many uniform chromatic lights. The RGB code values of all chromatic lights are calculated. Based on Matlab, simulation program of grating diffraction is complied. By changing adjustable parameters, computer simulations of white light interference and diffraction experi- ments (i. e. , grating diffraction, single slit and double-slit diffraction, double-beam and multi-beam interference experi- ments) can be achieved. The results of simulations (by using 2 000 uniform chromatic lights) show that the colors of simulation picture are sustainable and consistent with the results of actual experiments, and the simulation pictures can be connected to the multimedia screen directly and applied in areas of the optical computer aided instruction and the spectroscopic study.