Sample code used in this experiment:
from visual import *
import pylab as p
import mpl_toolkits.mplot3d.axes3d as p3
wavelength = 2.0e-3
scrnDist = 5.0e-2
scrnWdth = 2.4e-2
xs=0
ys=0
A=1
N=100
dX=scrnDist/N
Xcoords=arange(dX,scrnDist+2*dX,dX)
dY=scrnDist/N
Ycoords=arange(-scrnDist/2,scrnDist/2+2*dY,dY)
[xd,yd]=meshgrid(Xcoords,Ycoords)
r=sqrt((xd-xs)**2+(yd-ys)**2)
E0=A*cos(2*pi*r/wavelength)/r
#print E0
Add the following lines to obtain a visualization of the electric field through the space.
fig=p.figure()
Efield=p3.Axes3D(fig)
Efield.plot_wireframe(xd,yd,E0)
Efield.set_xlabel('Xd')
Efield.set_ylabel('Yd')
Efield.set_zlabel('E0')
p.show()
Add the following lines before the p.show command will show a 2D contour plot.
fig2=p.figure()
p.contour(xd,yd,E0)
3D plot 2D contour plot
To investigate the values of the filed variable E between the source and the screen.
For 2mm wavelength
For 4mm wavelength
For 8mm wavelength
From the above diagrams, it is shown that with an increased in wavelength, the wave field is less intense and more spread out. The results are expected. No interference pattern is observed since there is only one source. The wave is smooth and organized.
Interference: Situation when there is a small distance separate two point.
For 2mm wavelength
For 4mm wavelength
For 8mm wavelength
From the above diagrams, two peaks are observed on the 3-D plot. Interference patterns are found when a double slit is presence. The wave is not a smooth round shape anymore. With an increased wavelength, the wave field is less intense and more spread out.
The separation between the two sources was changed to 24mm
With an increased in the separation between the two sources, the distances between the lines increased. The interference effect is reduced.
Intensity of the wave field was measured to observe the interference effects.
Intensity with larger wavelength
As shown on the diagrams, the total intensity is zero at some points. The heights of the maximums change as I go away from the center. With a decreased in intensity, the distance increases. With an increased in wavelength, the distances between the lines decrease.
No comments:
Post a Comment