Abstract: In order to improve the teaching effect of optical diffraction,a specialized has been developed based
on Unity and Python.Unity is used to realize the integration of interactive interface and function,and the core
computing module is encapsulated by Python,establishing a unified cross-language collaborative architecture
that combines numerical simulation with virtual experimentation. Based on Fourier optics principles,the
software simulates both Fresnel and Fraunhofer diffraction,enabling flexible parameter adjustment for various
structures such as circular apertures and multi-slit configurations. It also incorporates advanced virtual
experiment modules,including aperture measurement using the half-wave zone method in Fresnel diffraction,
wavelength determination via double-slit Fraunhofer diffraction,and resolution analysis of Langqin grating.The
simulation results demonstrate strong consistency with theoretical predictions,validating the accuracy and
reliability of the software. The software effectively addresses the limitations of traditional experimental
conditions,offering an intuitive,flexible and reliable virtual simulation solution for optical education.