Yang’s double slit interference fringe matlab implementation

1. Young’s double-slit interference experiment

Interference conditions:

  • same frequency
  • The vibration direction is the same
  • Phase difference/optical path difference are the same

Parameter Description:

  • The distance between two seams:

    d

    d

    d

  • Screen and seam spacing:

    D

    D

    D

  • Wavelength:

    λ

    \lambda

    λ

  • The distance from the point on the screen to the center point is

    x

    x

    x

I

=

I

1

+

I

2

+

2

I

1

I

2

cos

?

δ

I = I_1 + I_2 + 2I_1 I_2 \cos \delta

I=I1? + I2? + 2I1?I2?cosδ

I

1

=

I

2

=

I

0

I_1 = I_2 = I_0

I1?=I2?=I0?

I

=

4

I

0

cos

?

2

δ

I = 4I_0\cos ^2 \delta

I=4I0?cos2δ

δ

=

2

π

λ

Δ

=

k

Δ

=

k

(

r

2

?

r

1

)

\delta = \frac{2\pi}{\lambda} \Delta = k \Delta = k (r_2 – r_1)

δ=λ2π?Δ=kΔ=k(r2r1?)

Optical path difference:

Δ

=

d

D

x

\Delta = \frac{d}{D}x

Δ=Dd?x

Light intensity changes:

I

=

4

I

0

cos

?

2

(

k

d

2

D

x

)

=

4

I

0

cos

?

2

(

π

d

λ

D

x

)

I = 4 I_0 \cos ^2 (\frac{kd}{2D}x) = 4 I_0 \cos ^2 (\frac{\pi d}{\lambda D}x)

I=4I0?cos2(2Dkd?x)=4I0?cos2(λDπd?x)


2. Matlab implements Young’s double-slit interference experiment

Basic parameter settings:

d = 2e-4;
D = 1;
lambda = 500e-9;
I0 = 1;

According to theoretical calculation, the stripe spacing:

Δ

x

=

D

d

λ

=

2.5

m

m

\Delta x = \frac{D}{d} \lambda = 2.5mm

Δx=dD?λ=2.5mm

Intensity changes of interference fringes:

%% interference intensity change

x = -10:0.01:10;

Intensity1 = 4*I0*cos(pi*d*x*1e-3/(lambda*D)).*cos(pi*d*x*1e-3/(lambda*D));

figure;
plot(x, Intensity1);
xlabel('x/mm');
ylabel('Intensity');
title('Interference fringe intensity change');

Interference fringe drawing:

%% Interference fringe 2D

x = -10:0.01:10;
y = -10:0.01:10;
[X,~] = meshgrid(x,y);

Intensity3 = 4*I0*cos(pi*d*X*1e-3/(lambda*D)).*cos(pi*d*X*1e-3/(lambda*D));

figure;
imagesc(x,y,Intensity3);
colormap('gray');
xlabel('x/mm');
ylabel('y');
title('Interference fringes');

colorbar;
ylabel(colorbar,'light intensity');