1 简介
物理光学研究的主要现象为光的干涉、光的衍射和光的偏振。其中杨氏双缝干涉理论在光的干涉教学中占有很重要的地位。由于物理光学从光的微观上来
理解光的本质,因此比较抽象。如果不借助于实验现象,学生很难理解其原理。这一直以来都是教学过程中的重点和难点。但是由于实验条件的限制,学生很难在课堂上通过实验来观察光的干涉现象,因此也就无法获得直观的认识。
随着计算机技术的飞速发展,计算机辅助教学(CAI)越来越受到人们的青睐,这为解决上述难题提供 了 途 径。Math Works 公 司 开 发 的 Matlab(MatrixLaboratory)软件是当今国际上公认的在数值计算和可视化图形、图像处理领域最为优秀的工程软件之一,广泛地应用于数学分析、系统仿真、信息光学、数字图像处理等领域。Matlab强大的绘图和动画功能可以生动形象且准确地反映出连续变化的物理光学现象。因此,将Matlab与光学教学有机地结合起来,有助于加深学生对基本概念和现象的理解以及认识,激发学生的学习热情,同时也能够使教学内容更加丰富,从而提高教学质量.本文中,我们采用了计算机仿真技术对杨氏双缝实验进行仿真,课上学生可以形象直观地感受光的干涉现象。可以让学生加深对所学光学内容的认知,把那些过于抽象的光学概念及解析公式简洁明了地呈现在学生面前。
杨氏干涉实验根据干涉屏上光路要通过的形状不同分为双缝干涉和双孔干涉。本文以杨氏双缝干涉为例,阐述其干涉原理。如图1所示,用平行光照射,光到达第一个狭缝,产生点光源S。根据惠更斯-菲涅尔原理,光源S相当于次波源,继续发射球面波,再经过双缝S1和S2,获得相干光源。S1和S2发出的光经过两个不同的传播路径,最后到达观察屏。由于在观察屏不同的位置,两束光的光程差不同,因此出现明暗相间的干涉条纹。设两条缝S1和S2之间的距离为d,狭缝到观察屏之间的距离为D。由于双缝S1和S2相对于中心点来说相互对称并且大小相等,所以可以认为光在通过S1和S2后所发出的两列光波在接收屏P点处的光强度也相等,即I1=I2,则P点处的干涉条纹分布为:
2 部分代码
function varargout = gui_light_13_9(varargin)% GUI_LIGHT_13_9 M-file for gui_light_13_9.fig% GUI_LIGHT_13_9, by itself, creates a new GUI_LIGHT_13_9 or raises the existing% singleton*.%% H = GUI_LIGHT_13_9 returns the handle to a new GUI_LIGHT_13_9 or the handle to% the existing singleton*.%% GUI_LIGHT_13_9('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in GUI_LIGHT_13_9.M with the given input arguments.%% GUI_LIGHT_13_9('Property','Value',...) creates a new GUI_LIGHT_13_9 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before gui_light_13_9_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to gui_light_13_9_OpeningFcn via varargin.%% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".function z_edit_Callback(hObject, eventdata, handles)% hObject handle to z_edit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of z_edit as text% str2double(get(hObject,'String')) returns contents of z_edit as a double% --- Executes during object creation, after setting all properties.function z_edit_CreateFcn(hObject, eventdata, handles)% hObject handle to z_edit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --------------------------------------------------------------------function light_menu_Callback(hObject, eventdata, handles)% hObject handle to light_menu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)light_pushbutton_Callback(hObject, eventdata, handles)% --------------------------------------------------------------------function close_menu_Callback(hObject, eventdata, handles)% hObject handle to close_menu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)close% --------------------------------------------------------------------function file_menu_Callback(hObject, eventdata, handles)% hObject handle to file_menu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)
3 仿真结果
4 参考文献
[1]李芳菊. 利用MATLABGUI模拟双缝干涉[J]. 河南科学, 2011, 29(10):3.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。