Optical experiments generally needs a stable environment, high precision of the instrument, so in the classroom to do optical experiment is extremely limited, and also by the teaching time limit. In order to overcome the optical experiment on experimental conditions are harsh disadvantages, can use computer simulation of optical experiment, especially optical demonstration experiments, combined with theory, the optical courses involving most phenomena displayed in front of students, in order to deepen the understanding of optical elements.
The double slit interference of light, single slit diffraction and grating diffraction is a very important teaching contents in university physics course studying, occupy the important position in. Computer simulation of optical interference phenomenon is the physical essence of better understanding and supplement. This paper use the Matlab software combined with the study of physics of light interference principle, the experiment of Newton's ring and double slit interference experiment of light intensity distribution of the programming operation, the phenomenon of the experiment simulation animation, and save it as a direct call to the GIF format animation graph, so that in a variety of media use, can make the student more easy to understand the interference phenomenon, to teaching has a good supporting role.