## Program 6: Two Slit Experiment

### Introduction and Purpose

The program TWO_SLIT.BAS shows a possible outcome of test 10.
To see the listing of the program select: TWO_SLIT.HTM

### Functional Description and Operation

The program shows the result of six experiments related to test 10, of: Two slit experiment

Case #1 and case #2 both show when one slit is used. 12400 photons are detected. 12400 is the size of the surface in pixels.
Case #3, case #4 and case #5, each show when two slits are used. The distance between the two slits is different.
Case #6 shows again when one slit is used. The number of photons has to be entered by the user
In case # 3 the distance between the two slits is 1.
In case # 4 the user should enter a value. The preferred value is 0.5.
In case # 5 the user should enter a value. The preferred value is 5
In case # 6 the prefered value for the total number of photons is 12400. In order to get a quick result, try 2000.

The difference between case #1 and case #6 is:

In case #1 only the shape of the curve is shown. The shape should be that of a gauss curve, but it is not.
Case #6 shows the result of an actual test. The curve has the shape of a gauss curve. The mathematics used in getting those results can be improved.

### Reflection

The dispayed 6 outcomes of test 10 are not correct. What the outcomes should be is the purpose of the question.
The possible points of discussion are:
1. What is the number of photons detected in case #2 assuming that the position of the photon source is not moved, compered to case #1?
2. What should be the total number of photons detected as a function of the distance between the two slits?
3. Where is the maximum ? In the middle between the two slits ?
4. Where are the two slits ? At the first minimum positions ?
Item 2 and 3 are linked. As indicated in the description of question 10 the position of one slot is fixed and the second one can be different.
5. What is the # of photons at maximum position ?
In each test the maximum # of photons in the center is the same, which most probably is not true.

### Technical Description

The program consists of 6 parts, each performing 1 experiment.
1. Part 1 and part 2 perform a one slit experiment.
The function displayed is 1 + cos(x).
x goes from 0 to pi.
The function has the following shape:
```                         xxxxxxxx
xxx        xxx
xx              xx
xxx                  xxx
xxxx                        xxxx
```
2. Part 3,4 and 5 perform a two slit experiment.
The function is displayed in the subroutine CURVE.
The function displayed is: {1 + cos(x)} * {1 + cos(x*l/10)} / 2
l is the size of the slit. x goes from 0 to pi.
3. Part 6 performs a one slit experiment.
Part 6 consists consists of 3 parts.
• Part 6.1 consists of the calculation of two arrays INX and INY
The following sketch shows two functions: f and y
```
y = ymax                      yyyy
y
y
y
y
y
y fff
f f     f f
y = 0  fyfy                   ffff
x = -3s -2s -1s  0  1s  2s  3s

-(x*x)/s
f = e
y = sum over f   from 0 to x
s = sigma = 1
```
The function f is a normal distribution, with average 0 and spread (s, sigma) = 1
The array INX contains 50 values of x at equal distances
The array INY contains 50 values of y for the corresponding x value.
• Part 6.2 consists of the actual photon experiment.
In this part the array DISPLAY is calculated.
When a photon at a distance x is detected the array DISPLAY at location x is increased with one.
In order to calculate the position of a photon a random number generator is used.
This random number generator generates a number between 0 and 1.
This value is multiplied with ymax, the final value of y for x=3s.
The resulting number is used to calculate an index into array INY.
The same index into array INX gives the distance x.
• Part 6.3 consists of the display of the array DISPLAY.
Suggestions for improvement of this paragraph are appreciated.

### Feedback

28/10/96 The program worked nicely.