The Wayback Machine - https://web.archive.org/web/20120317055808/http://www.kw.igs.net:80/~jackord/df/d1.html

Diffraction

One can demonstrate diffraction patterns very easily with a helium-neon laser and a selection of fine pinholes, narrow slits, plastic gratings, and fine screens (of the type used to supportspecimens in an electron microscope). The patterns one produces on a distant screen in this way are known as Fraunhofer patterns. Patterns one produces with larger apertures on closer screens, known as Fresnel patterns, are usually demonstrated using microwaves.

One calculates diffraction patterns numerically by using Huygens' Principle. It states that each point on a wavefront may be regarded as a source of wavelets spreading out in all directions. Diffraction results from interference between wavelets originating from points on a wavefront that is restricted by an aperture or blocked by an obstruction. One calculates the pattern numerically by superimposing wavelets from an array of points distributed uniformly across the aperture. The superposition involves addition of vectors in the complex plane. Vectors of the same length with a constant small phase difference sum to give a resultant whose tip traces out the arc of a circle in the complex plane. When the first and last vectors in the sum are 180 degrees out of phase, the arc is a semicircle, and the resultant has its maximum length. A region of a wavefront that produces wavelets that superimpose in this manner at a point on the screen is known as a Fresnel Half-Period Zone. The general wavelet superposition algorithm is not concerned with zones, and makes no distinction between Fresnel and Fraunhofer diffraction, but the zone concept is useful for explaining the calculated patterns.

Fresnel Diffraction

The superposition algorithm deals mainly with phase differences, but it also takes account of factors that vary the amplitude. In order for Huygens' wavelets not to generate a reflected wave, the amplitude must include the obliquity factor (1+cos(q))/2, where q is the angle between the normal to the wavelet and the normal to the incident wave. It also includes a factor to deal with decrease in intensity with distance (inverse square for spherical waves, inverse first power for cylindrical waves). The algorithm is not difficult to write, but wavelets from the array of points in the aperture have to be superimposed at each point on the screen, so a lot of computation is involved.

Circular Aperture

For a circular aperture we need only calculate how the intensity varies as we move radially outward from the centre of the pattern. In the applet a plane wave is incident normally on a circular aperture of diameter d (96 pixels). The diffraction pattern is formed on a screen 10 d beyond the aperture. The screen is a square 2.5d on a side, and the geometric shadow the aperture is shown on it. The wavelength of the incident radiation can be varied between d/10 (9.6 pixels) and d/160 (0.6 pixels). The calculation uses a square array of wavelet sources spaced d/141 apart. The diffraction pattern is displayed on the left, and a plot of the intensity variation is shown on the right. The pattern is overexposed by a factor of two, so if you cut off the top half of the intensity plot you get a plot that corresponds with what you see in the pattern.

Java Source   BBC Basic Source   Liberty Basic Source   PostScript Source

As the wavelength decreases from d/10 to d/40, the pattern exhibits a central peak that gets progressively narrower. There is a major change in the pattern at a wavelength of d/80: the intensity goes to zero at the centre. This occurs because the path to the edge of the aperture is one wavelength longer than the path to the centre. In the language of Fresnel zones, at the centre of the pattern the aperture spans two half-period zones, and the wavelets from the second zone cancel out those from the first. As the wavelength decreases to d/120 and d/160, the aperture spans 3 then 4 half-period zones, the centre of the pattern goes to bright and then back to dark, and secondary maxima and minima appear.

There are a number of subtle points I must mention here (I suggest the casual reader skip ahead to the next section). The algorithm is perfectly general, but it does involve calculations of small differences in large quantities, so it works best in languages that run in double precision. I originally introduced PostScript in this section to show the problems that arise when you try to run the algorithm in single precision (the parameters in the present example were chosen to give valid results in PostScript). Recent versions of Java also have problems with the algorithm. Execution slows by a factor of 7 (compared with earlier Java versions) when trig functions with large arguments are encountered, (The variable r0 was introduced to solve this problem). The size of the wavelet source array is always a compromise between accuracy and speed. More importantly, the source array creates its own diffraction pattern. To stay clear of its effects, the path difference to a point on the screen from adjacent sources in the aperture needs to be an order of magnitude smaller than the wavelength. (Our example does not quite meet this requirement at the shortest wavelength).

Fraunhofer Diffraction

Circular Aperture

The Fraunhofer algorithm assumes the wavelets to be superimposed leave the aperture on parallel paths. The phase differences are calculated as wavelets leave the aperture and involve only small quantities. (The path difference is the dot product of a unit vector in the path direction with a vector giving the displacement between the sources in the aperture). The parallel path assumption does not impose a serious limitation. If the screen is not at a great distance, a lens will take incoming parallel rays and form a Fraunhofer pattern on a screen in its second focal plane.

In the applet, light from a helium-neon laser passes through a circular aperture 0.05 mm in diameter and falls on a screen 1000 mm away (125 mm when "z/8" is chosen). The screen is 240 mm square, and 1 pixel represents 1 mm on the screen. The wavelet sources are distributed either on a square grid with 41 points (21 points when "n/2" is chosen) along the diameter, or randomly across the aperture when "Rnd" is chosen (the random array has the name number of wavelet sources). For the square array, the pattern is calculated over one quadrant of the screen, and is overexposed 1000x. For the random array, the calculation extends over the full screen, and the overexposure is 500x.

Java Source   BBC Basic Source   Liberty Basic Source   PostScript Source

With the screen at 1000 mm from the aperture, the pattern from the square source array shows the expected cylindrical symmetry with a fine structure which is more pronounced when "n/2" is chosen. The first minimum in the pattern is sharply defined, and you can find the angle at which it occurs using a ruler. For a circular aperture, analytic calculations predict the radian measure of the angle will be 1.22 times the ratio of the wavelength to the diameter. I get reasonable agreement with this prediction. The pattern from the random array is quite different. Fraunhofer rings due to the aperture are still apparent at the centre (unless "z/8" is chosen), but elsewhere the pattern reflects the randomness of the source array. Clearly, the square grid is far better than the random array for generating the diffraction pattern of the aperture. One thing to note about the pattern from the random array is that it has a centre of symmetry. (This characteristic of Fraunhofer diffraction patterns is further illustrated in the next applet).

When the screen is at 125 mm from the aperture, it captures a wider angle view of the diffraction pattern. (This view could be captured at 1000 mm with a larger screen). We now see the diffraction pattern from the square array with the shape of the individual spots modulated by diffraction from the aperture. If we had increased the number of sources along the diameter to 81 instead of reducing it to 21, only the central maximum of the pattern from the array would have appeared on screen. More will be said about diffraction from source arrays in X-Ray Diffraction.

Triangular and Rectangular Apertures

In this applet the aperture is either an equilateral triangle with side .05 mm, a .05x.025 mm rectangle, or a .05 mm square. The triangle has its base horizontal, and wavelets originate from sources arranged like pool balls in a rack (with 50 sources along the base unless "n/2" is chosen). The calculation is carried out over the right half of the screen. The shape and orientation of the aperture is superimposed in white on the diffraction pattern, but does not define the boundary of the geometric shadow as it did for Fresnel patterns. (The geometric shadow is a mere pinprick at the centre of the Fraunhofer pattern). The Screen can be moved in from 1000 mm to 125 mm.

Java Source   BBC Basic Source   Liberty Basic Source   PostScript Source

When the centre of inversion of Fraunhofer patterns combines with the three-fold rotational symmetry of the aperture (and the array) it produces a pattern with a six-fold rotational symmetry (and hence no triangular shapes). (The same sort of symmetry considerations relate the moments of inertia of an equilateral triangular plate). When the screen is moved to 125 mm it captures a wider angle view of the diffraction pattern (as it did for the circular aperture).

The rectangular and square apertures offer the opportunity to introduce a much faster algorithm for generating Fraunhofer diffraction patterns. The apertures are illuminated by light from a helium-neon laser, the diffraction patterns are produced on a screen 1 m away, and 1 pixel represents 1 mm on the screen. The wavelet sources are arrayed on a 512x1024 grid for the rectangle and a 1024x1024 grid for the square. If we were to superimpose this many wavelets one by one it would take a very long time to generate the diffraction pattern, but with rectangular symmetry we don't need to superimpose them one by one. Once we have the result of superimposing wavelets from two sources, we can superimpose wavelets from a displaced set of two sources. Next we superimpose wavelets from a displaced set of four sources, and so on. When we have completed one row, we then go on to superimpose rows and sets of rows. For the square, instead of summing over 1024x1024=1,048,576 terms, we sum over only 20 terms terms. It takes 30 times as long to generate the pattern for the triangle where the sum extends over only 1275 terms. (Admittedly the triangle calculation uses 2-fold, not 4-fold symmetry of the screen). The fast algorithm is even more powerful when extended to three dimensions as it is in the section on x-ray diffraction. Progressive doubling lets one start with one atom and build up very rapidly to a macrocsopic crystal. Note that the rectangular shapes in the diffraction pattern are rotated 90 degrees with respect to the rectangular aperture - they are not fuzzy images of the aperture.

Diffraction Grating

The next applet shows how slits can be combined to form a diffraction grating, a device for determining the wavelengths present in a beam of light. Patterns are calculated for four different colors: red C (656.3 nm), yellow D (589 nm), green E (526.9 nm), and blue F (481.6 nm). The grating has n = 1, 3, or 5 slits of width w = 2 microns at a spacing of d = w, 2w, or 3w. The intensity pattern is viewed on a screen 1 m from the grating with 1 pixel representing 1 mm in the x direction. At a slit spacing of w the diffraction pattern is that of a slit of width nw. The analytic Fraunhofer expression for red C is shown in magenta on a line plot when d = 2w, n = 3 is selected. The slight difference between the magenta line and the red pattern is due to the fact that the numerical calculation includes an amplitude/obliquity factor. If it is commented out of the program, the difference disappears on the scale of the plot.

Java Source   Liberty Basic Source   BBC Basic Source   PostScript

X-Ray Diffraction

Cubic Crystals

The fast algorithm in the previous section was developed to superimpose wavelets originating from points on a wavefront in an aperture, but it shows its true power when it is used to superimpose x-rays diffracted from atoms in a crystal. The extension of the algorithm to deal with a three-dimensional array of wavelet sources is direct, and allows the screen to be placed to detect x-rays either transmitted through the crystal or reflected back from it. When Scan n is chosen the applet shows how the pattern develops as the number of lattice points on each axis of a cubic array doubles successively from 2 to 1024 (the plot is overexposed by a factor of 10). There is no noticeable change in the pattern beyond n = 256, and you have the option of setting n to this value instead of scanning it.

X-ray diffraction usually is carried out in one of two ways: a fixed crystal is exposed to a continuum of wavelengths, or a rotating crystalline powder is exposed to a single wavelength. We cannot simulate either of these conditions in a simple program. The applet takes fixed cubic crystals and shows the transmission and back-reflection patterns produced when they are struck by an x-ray beam with one of three wavelengths. In order to select suitable wavelengths, we need to know some basics facts about crystallography and x-ray diffraction.

The usual starting point for x-ray diffraction is Bragg's Law. If an x-ray beam strikes a plane of atoms in a crystal, the reflections from all the atoms on the plane will be in phase if the angle of reflection equals the angle of incidence. In x-ray diffraction we use the Bragg angle, the angle with the plane, rather than the angle of incidence, the angle with the normal. When a beam is reflected from a plane, it deflected through twice the Bragg angle. Bragg's Law states that for an x-ray beam to be reflected strongly from a stack of parallel planes, the reflections from adjacent planes in the stack must be in phase. Bragg's Law and the related crystallography are given below.

The x-ray beam is incident along the z-axis of a cubic lattice composed of unit cells of side a. If there are lattice points only at the corners of the cell, the lattice is Simple Cubic (SC). If a basis of two lattice points, the second at the body centre, is associated with each corner, the lattice is Body-Centred Cubic (BCC). If the basis has added lattice points at the centres of the adjacent faces, the lattice is Face-Centred Cubic (FCC). All the lattice points have identical surroundings - the use of a basis is a convenience that lets us use the same unit cell for all three lattices. Planes in a crystal are described by their Miller indices: three integers written (hkl). The Miller indices of a plane are the reciprocals of its intercepts on the crystal axes (in units of a). They are also components of a vector perpendicular to the plane that can be used to calculate the Bragg angle and interplanar spacing. A (011) plane will not reflect a beam that strikes the screen because for a beam incident in the (001) direction the Bragg angle is 45 degrees. A (111) plane on the other hand has a Bragg angle whose sine is one over the root of three, or 35.264 degrees. The deflection angle is twice this, or 70.528 degrees. The screen in the applet has a width that is 8 times its distance from the crystal and can capture x-rays deflected through angles up to 76 degrees. The first wavelength (with m=3) was chosen to produce Bragg reflections from (111) planes. The other two were chosen to produce reflectons from (201) and (211) planes.

The use of the SC lattice with basis introduces a Structure Factor for the BC and FCC lattices. It arises because waves from the basis can interfere with each other and cancel out Bragg reflections that would be present from an SC lattice. The numerical program starts by summing waves from the basis, and if the same is done in an analytic calculation, the Structure Factor emerges as a multiplying factor on the intensity. Its effect on the diffraction pattern can be expressed in the following way:
Body-centred cubic crystals only reflect x-rays from planes whose Miller Indices sum to an even number.
Face-centred cubic crystals only reflect x-rays from planes whose Miller Indices are either all even or all odd.

Java Source   BBC Basic Source   PostScript Source   PostScript B&W; Source

Two versions of the PostScript program are given. Each uses n = 256 and produces a page of six patterns for one of the three wavelengths. The first gives the same green on black patterns as the Java applet, and is suitable for viewing on a screen using GSview. The B&W; version gives a black on white pattern suitable for printing and doing measurements. Using a ruler, and knowing that the width of the screen is eight times its distance from the crystal, you can determine the Bragg angle for each reflected beam. Measure the distance between corresponding spots on opposite sides of the centre in any units you wish, then divide by the width of the screen in the same units. Multiply the result by four, take the inverse tangent, then divide by two. The result will be the Bragg angle for a transmitted beam, and ninety degrees minus the Bragg angle for a reflected beam. Once you know the Bragg angle you can determine the Miller Indices of the reflecting plane.

I will interpret the six patterns produced using a wavelength of 2a/3 (the first page of the PostScript program), and leave the other patterns for you to interpret. The four spots on the SC transmission pattern are easily seen to be from (111) planes. The four spots in the back-reflection pattern are in the same place, but the Bragg angle is larger, and the reflections are from (112) planes. When we look at the BCC patterns, we see no (111) reflections in transmission but the four (112) planes are present in reflection. This is in accord with the rule that the indices must sum to an even number for reflection to occur. The FCC transmission pattern is the same as the SC pattern because the indices are all odd, and the (112) reflections are missing on reflection because the indices are mixed. The patterns also may have a spot in the centre. In "real" x-ray diffraction the spot in the centre of a transmission pattern is produced by the incident beam, and a reflection pattern has a hole in the centre through which the incident beam passes. Our calculated transmission patterns always have a spot in the centre because there is no path difference between the wavelets we are summing. On reflection there is a path difference of 2a between adjacent planes in the SC lattice, and in our case this is always an integral number of wavelengths, so there is a central spot in the pattern. For BCC and FCC lattices, the basis inserts an intermediate plane, and an even number of wavelengths is required to produce a spot in the centre of the pattern.

Have fun with the other patterns!

Close Packing

In the previous section, the face-centred cubic lattice was generated by attaching a basis to a simple cubic lattice. It can also be generated by stacking close-packed planes of hard spheres. The spheres are placed in planes in the same way that billiard balls are placed in a rack, and if the planes are stacked closely with each plane having the same displacement from the plane beneath it, a face-centred cubic lattice is formed. (If each plane reverses the displacement of the one beneath it, a Hexagonal-Close-Packed structure is formed, and HCP is not a lattice). In the applet, the X-axis is a close-packed direction and the X-Y plane is a close-packed plane. The planes are stacked to form an FCC crystal with the external shape of a rhombohedron. The x-ray beam is incident along the Z-axis, a (111) direction normal to close-packed planes.

The rules stated above for reflection in FCC structures still apply. (Only the Geometry equation changes for a beam incident in a (111) direction). The wavelength is set equal to the spacing between close-packed planes, and patterns with three-fold rotational symmetry are produced. A bit of work with a ruler will show you that transmission pattern is due to (200) planes, and the reflection pattern to (220) planes.

Java Source   BBC Basic Source

Back to Index