← 返回资讯屏轩教育 · 行业资讯

The Young Double-Slit Experiment: A Computational Approach | 杨氏双缝实验的计算模拟

2026-08-02 13:54 · 本文部分内容由AI辅助创作

📚 The Young Double-Slit Experiment: A Computational Approach | 杨氏双缝实验的计算模拟

In this article we revisit the classic Young double-slit experiment – a cornerstone of wave physics – and explore how computational methods can be used to simulate and visualise interference patterns. By combining physical principles with simple programming techniques, you will gain a deeper understanding of both the optics and the modelling skills that are increasingly important in modern science. The discussion is tailored for A-Level candidates who want to see how a traditional physics experiment can be approached through the lens of computer science.

本文重新审视经典的杨氏双缝实验——波动物理学的基石——并探索如何使用计算方法来模拟和可视化干涉图样。通过将物理原理与简单的编程技术相结合,你将更深刻地理解光学原理以及在现代科学中日益重要的建模技能。本文专为希望看到传统物理实验如何通过计算机科学视角来处理的 A-Level 考生而设计。

1. Introduction to Interference | 干涉引言

Interference occurs when two or more coherent waves overlap, resulting in a new wave pattern where amplitudes add constructively or destructively. In the Young double-slit experiment a single light source is used to create two coherent secondary sources, producing an interference pattern of alternating bright and dark fringes on a distant screen. Understanding this pattern is key to grasping wave‑particle duality and the limits of classical optics.

当两个或多个相干波叠加时就会发生干涉,形成一个新的波场,其中振幅会发生相长或相消叠加。在杨氏双缝实验中,一个单色光源被用来产生两个相干的次级光源,从而在远处的屏幕上产生明暗交替的干涉条纹。理解这一图样是掌握波粒二象性以及经典光学边界的关键。

2. The Young Double-Slit Setup | 杨氏双缝装置

The standard arrangement consists of a narrow single slit illuminated by a monochromatic source, followed by a pair of closely spaced parallel slits (the double slit). Light emerging from the two slits acts as two coherent point sources. A screen is placed at a large distance D from the double slit, and the resulting intensity pattern is observed.

标准装置包括一个被单色光源照射的窄单缝,以及紧随其后的一对间隔很近的平行狭缝(双缝)。从这两个狭缝中射出的光充当两个相干的点源。屏幕被放置在距离双缝很远的位置 D 处,观察到的强度图样即为干涉条纹。

Key geometry: fringe separation Δy = λD / d

关键几何关系:条纹间距 Δx = λD / d

SymbolMeaningTypical unit
λWavelength of lightMetres (nm)
dSeparation of the two slitsMetres (mm)
DDistance from slits to screenMetres
ΔxFringe spacing (centre‑to‑centre)Metres (mm)

3. Path Difference and Phase | 波程差与相位

f the path difference is an integer multiple of the wavelength (δ = nλ), waves arrive in phase and produce constructive interference. If δ = (n + ½)λ they arrive out of phase, giving destructive interference.

在屏幕上某点 P,设从两条狭缝到 P 的路径长度分别为 S₁P 和 S₂P。波程差 δ = S₂P − S₁P 决定了干涉的类型。若波程差为波长的整数倍(δ = nλ),波到达时同相,产生相长干涉。若 δ = (n + ½)λ,则反相到达,产生相消干涉。


4. Bright and Dark Fringes | 亮纹与暗纹

es occur at angles satisfying d sin θ = nλ, and dark fringes at d sin θ = (n + ½)λ. On the screen, the central maximum (n=0) is the brightest; higher‑order maxima become progressively dimmer due to the single‑slit envelope and reduced amplitude.

在小角度近似下,波程差约为 d sin θ,其中 θ 是中心轴与屏幕上点的夹角。亮纹出现在满足 d sin θ = nλ 的方向,暗纹出现在 d sin θ = (n + ½)λ 的方向。屏幕上中央极大(n=0)最亮;由于单缝包络和振幅衰减,高阶极大逐渐变暗。


5. Fringe Separation Formula | 条纹间距公式

bright fringes (or adjacent dark fringes) is given by Δx = λD / d. This formula assumes D ≫ ermine the wavelength of light when d and D are known and Δx is measured from the pattern.

屏幕上相邻亮纹(或相邻暗纹)之间的线性距离由 Δx = λD / d 给出。该公式假设 D ≫ d 且角度很小,从而 sin θ ≈ tan θ ≈ y/D。当已知 d 和 D 并通过图样测得 Δx 时,该公式被广泛用于测定光波波长。

Δx = λD / d


6. Experimental Measurements | 实验测量

In a typical school laboratory, a laser provides a coherent monochromatic source. The double slit is often a slide with two etched lines. The pattern is projected onto a screen or a white wall. Students measure the total distance across several fringes and divide by the number of gaps to obtain an accurate value for Δx. Repeating with different slit separations or distances reinforces the inverse relationship between Δx and d.

在典型的学校实验室中,激光器提供相干单色光源。双缝通常是一个刻有两条线的幻灯片。图样被投射到屏幕或白墙上。学生测量跨越多个条纹的总距离,再除以间隙数,从而得到精确的 Δx 值。利用不同的狭缝间距或距离重复实验可以巩固 Δx 与 d 之间的反比关系。


广告 / Sponsored

7. Computer Simulation: Overview | 计算机模拟概述

Modern physics investigation often integrates computational tools. Simulating the double‑slit experiment allows us to visualise the superposition of circular wavefronts emanating from the two slits. We can model the wave amplitude at each point on the screen using the principle of superposition and then plot the intensity pattern. This approach is an excellent exercise in combining physics with programming logic.

现代物理研究常常融合计算工具。模拟双缝实验让我们可以可视化从两个狭缝发出的圆形波前的叠加。我们可以利用叠加原理建模屏幕上每一点的波振幅,然后绘制强度图样。这种方法是将物理与编程逻辑相结合的绝佳练习。


8. Modelling the Wavefronts | 波前建模

Consider two point sources separated by a distance d. Each source emits spherical waves of the form A sin(kr − ωt + φ), where r is the distance from the source to the point of interest. In a static snapshot we can ignore the time dependence and work with the spatial part: the amplitude at a point (x, y) on the screen is approximately proportional to the sum of two harmonic functions based on the path lengths r₁ and r₂.

考虑两个相距 d 的点源。每个源发出球面波,形式为 A sin(kr − ωt + φ),其中 r 是从源到目标点的距离。在静态快照中我们可以忽略时间依赖,只处理空间部分:屏幕上点 (x, y) 的振幅近似与基于路径长度 r₁ 和 r₂ 的两个谐函数之和成正比。


9. Discretising the Screen | 屏幕离散化

To simulate the pattern on a computer, we define a two‑ en. Each pixel corresponds to a coordinate (y, z) if we place the screen parallel to the y‑ to every pixel, evaluate the sum of wave contributions, and then calculate the intensity I ∝ choice is to use a grid of 800×600 pixels with physical dimensions mapped to centimetres.

为了在计算机上模拟图样,我们定义一个代表屏幕的二维网格。假设屏幕放在距离 x = D 处且平行于 y‑z 平面,则每个像素对应一个坐标 (y, z)。我们计算从每个狭缝到每个像素的欧几里德距离,求波叠加之和,然后计算强度 I ∝ (振幅)²。常用的做法是使用 800×600 像素的网格,并将物理尺寸映射为厘米。


10. Coding the Interference Pattern | 编写干涉图案代码

Below is a fragment of Python code that uses NumPy and Matplotlib to generate the interference pattern. The idea is straightforward: define arrays for y and z, compute r₁ and r₂, sum the cosine or sine contributions, and display the squared amplitude as an image.

下面是一段利用 NumPy 和 Matplotlib 生成干涉图案的 Python 代码片段。思路很直接:定义 y 和 z 的数组,计算 r₁ 和 r₂,叠加余弦(或正弦)贡献,并将振幅的平方作为图像显示。


import numpy as np
import matplotlib.pyplot as plt

# Physical parameters
wavelength = 632.8e-9   # He-Ne laser in metres
d = 0.5e-3              # slit separation 0.5 mm
D = 2.0                 # screen distance 2 m
k = 2 * np.pi / wavelength

# Screen discretisation
ymin, ymax = -0.05, 0.05   # 10 cm width
zmin, zmax = -0.05, 0.05
pixels = 600

y = np.linspace(ymin, ymax, pixels)
z = np.linspace(zmin, zmax, pixels)
Y, Z = np.meshgrid(y, z)

# Slit positions (symmetrical about origin)
s1 = np.array([0, -d/2])
s2 = np.array([0,  d/2])

# Distances from each slit to every pixel
r1 = np.sqrt(D2 + (Y - s1[1])2 + (Z - 0)**2)
r2 = np.sqrt(D2 + (Y - s2[1])2 + (Z - 0)**2)

# Superposition of waves (cosine for real amplitude)
amplitude = np.cos(k * r1) + np.cos(k * r2)
intensity = amplitude**2

# Plot
plt.figure(figsize=(8,6))
plt.imshow(intensity, extent=[ymin, ymax, zmin, zmax],
           cmap='gray', origin='lower')
plt.colorbar(label='Intensity')
plt.xlabel('y (m)')
plt.ylabel('z (m)')
plt.title('Double‑slit interference pattern')
plt.show()

code produces a pattern of horizontal bright and dark bands that match the classic double‑slit fringes. The central bright fringe is flanked by symmetric first‑order maxima, and the fringe spacing is consistent with Δx = λD/d.

运行这段代码会生成与经典双缝条纹一致的明暗水平带。中央亮纹两侧对称分布着一级极大,条纹间距与 Δx = λD/d 一致。


11. Visualising Results | 结果可视化

Computational simulation offers more than just a static image. By adjusting the parameters interactively – changing the wavelength, slit separation, or screen distance – you can observe how the fringe spacing responds. Plotting an intensity line profile along the central y‑axis makes it easy to measure Δx precisely. Such dynamic exploration strengthens the link between the algebraic formula and the visual outcome.

计算模拟提供的不仅仅是一幅静态图像。通过交互式地调整参数——改变波长、狭缝间距或屏幕距离——你可以观察条纹间距如何响应。绘制沿中心 y 轴的强度线轮廓可以方便地精确测量 Δx。这种动态探索加强了代数公式与视觉效果之间的联系。

Intensity profile: I ∝ cos²(π d y / λD)

强度轮廓:I ∝ cos²(π d y / λD)


12. Extending the Simulation | 模拟扩展

The same computational framework can be extended to include a single‑slit diffraction envelope, multiple slits, or even non‑monochromatic light. By incorporating time dependence or random phases, you can explore temporal coherence. In a computer science context, such models introduce algorithmic thinking, array programming, and numerical methods, which are highly relevant for fields like data science, physics engines, and graphics rendering.

同样的计算框架可以扩展为包含单缝衍射包络、多缝甚至非单色光。通过加入时间依赖或随机相位,还可以探索时间相干性。在计算机科学的语境下,这类模型引入了算法思维、数组编程和数值方法,这在数据科学、物理引擎和图形渲染等领域具有很高的相关性。

Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao