teaching and education\(\def\hfill{\hskip 5em}\def\hfil{\hskip 3em}\def\eqno#1{\hfil {#1}}\)

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767

Microdisplays as a versatile tool for the optical simulation of crystal diffraction in the classroom

aDepartment of Materials, ETH Zurich, 8093 Zurich, Switzerland
*Correspondence e-mail: jannis.lehmann@mat.ethz.ch

Edited by J. M. Garcia-Ruiz, CSIC-UGR, Granada, Spain (Received 6 December 2018; accepted 3 February 2019; online 26 March 2019)

Presented here is a flexible and low-cost setup for demonstrating X-ray, electron or neutron diffraction methods in the classroom. Using programmable spatial light modulators extracted from a commercial video projector, physical diffraction patterns are generated, in real time, of any two-dimensional structure which can be displayed on a computer screen. This concept enables hands-on experience beyond simplest-case scenarios of scattering phenomena, and for the students, the transfer to the regime of visible light greatly enhances intuitive understanding of diffraction in real and reciprocal space. The idea and working principle of the modified video projector are explained, technical advice is given for its choice and successful modification, and a Python-based open-source program code is provided. Program features include the design and interactive manipulation of two-dimensional crystal structures to allow a straightforward demonstration of concepts such as reciprocal space, structure factors, selection rules, symmetry and symmetry violation, as well as structural disorder. This approach has already proved helpful in teaching crystal diffraction to undergraduate students in materials science.

1. Introduction

The theory of diffraction and the correspondence between real and reciprocal space are particularly challenging concepts for undergraduate students in physics, chemistry or materials science. Theory-centred lectures introduce the basic ideas, but examples are naturally restricted to simple static cases. To approach more complex and real-life-oriented problems, flexible and realistic demonstrations may be useful as they provide a more intuitive understanding of the diffraction process.

Current teaching methods can be roughly divided into three categories. The oldest approach is plotting graphs of the interference function. While this is useful to visualize the fundamental mathematics, it does not help the student to grasp complex diffraction patterns. Later, X-ray diffraction was mimicked using visible laser light, diffracted from structures printed on transparent slides  (Welberry & Jones, 1980[Welberry, T. R. & Jones, R. D. G. (1980). J. Appl. Cryst. 13, 244-251.]) or from everyday objects such as tissues, textiles or fine sieves. Collections of real-space structures and their corresponding diffraction patterns were published in the Atlas of Optical Transforms (Harburn et al., 1975[Harburn, G., Taylor, C. A. & Welberry, T. R. (1975). Atlas of Optical Transforms. London: G. Bell & Sons.]). With such optical transforms, diffraction patterns from complex two-dimensional structures may be demonstrated and typical reciprocal-space fingerprints of structure types can be recognized, but the requirement for having printed slides makes this approach static and inflexible. In the past few decades, the availability of fast computers has allowed the calculation of diffraction patterns even in the case of complex structures (Neder & Proffen, 1996[Neder, R. B. & Proffen, Th. (1996). J. Appl. Cryst. 29, 727-735.]). Full flexibility is preserved and students are able to create their own structures and the corresponding diffraction patterns on a computer screen. However, this approach suffers not only from calculating an experiment rather than actually performing it, but also from numerical artefacts of the Fourier-transform calculation (Chitode, 2008[Chitode, J. S. (2008). Digital Signal Processing. Pune: Technical Publications.]; Gonzalez & Woods, 2017[Gonzalez, R. C. & Woods, R. E. (2017). Digital Image Processing, 4th ed. London: Pearson.]). These are, for example, aliasing effects, numerical noise and truncation effects, as well as difficulties in the representation of incoherent or partly coherent effects. Such numerical artefacts are significantly different from experimental errors (Convert & Miege, 1992[Convert, F. & Miege, B. (1992). J. Appl. Cryst. 25, 384-390.]; Proffen & Neder, 1997[Proffen, Th. & Neder, R. B. (1997). J. Appl. Cryst. 30, 171-175.]), which are, for example, the point spread function, noise due to Poisson statistics of the diffraction event or background scattering. This may easily result in an unnatural appearance of the calculated diffraction pattern. Finally, the computational demands for calculating the Fourier transform of a structure impede a flicker-free continuous parametric manipulation of the structure and the resulting diffraction pattern.

Here, we combine the flexibility of computer-based experiments with the intuitiveness and immediacy of optical demonstrations. For this purpose, a computer-generated interactively manipulable structure is sent to a standard projector that displays the structure in the classroom. Simultaneously, the same video signal is transferred to a modified commercial video projector in which a laser directly illuminates the projector's microdisplay. The modulated light is subject to diffraction that arises from the optical-density function on the microdisplay, i.e. the structure shown on the screen. This interference pattern can now be projected next to the projection of the real-space structure. Thus, we merge the best aspects of two worlds, namely the flexibility of computer-generated structures combined with an instantaneous experimental, rather than computational, high-resolution optical image transformation. By up-scaling from atomic to optical dimensions and by utilizing spatial light-modulation techniques, we arrive at a vivid and intuitive understanding of crystal diffraction.

2. Hardware

The experimental setup, shown in Fig. 1[link], is built around a spatial light modulator (SLM), which is the central element of our setup and represents the sample in a typical diffraction experiment. The SLM, the video connectors and the inter­facing electronics are dismantled from a conventional video projector. During the evolution of projector technology for home cinema, three main microdisplay technologies have been established – reflective digital light processing (DLP), transmissive liquid crystal displays (LCD) and reflective liquid crystal on silicon (LCoS). The LCoS technology (Armitage et al., 2006[Armitage, D., Underwood, I. & Wu, S.-T. (2006). Introduction to Microdisplays. Chichester: John Wiley & Sons.]; Datta & Munshi, 2016[Datta, A. K. & Munshi, S. (2016). Information Photonics: Fundamentals, Technologies, and Applications. Boca Raton: CRC Press.]), which is based on thin-film transistor (TFT) pixel elements, best suits the purposes of our experiment. The alternative technologies (LCD and DLP) suffer from pronounced pixelation, leading to strong unwanted side reflections.

[Figure 1]
Figure 1
The experimental setup. The modified video projector is built onto an optical breadboard, hosting the control panel (a), three LCoS SLMs (e), power electronics and video connectors (inside the board). A laser source (b) emits a collimated green light beam of 2 mm diameter, which is directed via an alignment mirror (c) to a polarizing beam splitter (d). The beam splitter reflects the beam to the centre of the reflective SLM (e) that processes the green colour channel of the video stream. The diffracted light is now spatially modulated in its polarization state. By passing through the polarizing beam splitter again, this modulation is transferred into an amplitude modulation of the reflected light. An aperture (f) filters unwanted higher-order diffraction components before the beam is directed to the projection screen.

In LCoS microdisplays, each pixel contains a liquid crystal layer that is enclosed between a homogeneous transparent front electrode and a patterned reflective back electrode. The crystal's preferred orientation is set by fixed alignment layers. By locally applying a voltage between the two electrodes (corresponding to the chosen grey value for that considered pixel), a re-alignment of the liquid crystals is induced which modifies the optical anisotropy of the active layer. This change in local optical properties can be used to rotate the polarization direction of an incident light wave. As a result, the LCoS modulators act as mirrors, providing a high-resolution two-dimensional control of birefringence and thus of the polarization state of a reflected light wave.

For low-cost access to LCoS SLMs, we disassembled a video projector (here, a Canon XEED SX50). After removing the optical and mechanical components not required for our mode of operation, the safety interlocks for the electrical circuits (closed casing, lamp and fans) have to be identified and bridged. In our example, the projector hosts three SLMs, one for each of the red, green and blue colour channels of the standard RGB colour space. We select the SLM that is optimized for the light wavelength used in our setup, so only the corresponding colour channel of the video stream is utilized. The required components remaining from the original hardware of the video projector are the reflective SLMs connected to the main board, which serves as the usual display interface, and the power electronics. For cooling the main and power electronic boards, we kept one fan active. For convenient operation and transport, the system was placed on an optical breadboard (Fig. 1[link]). Depending on the projector design, it may be unnecessary to disassemble the instrument as we did; removing the passive optical elements and replacing the light source might be sufficient.

As depicted in Fig. 1[link], a collimated light beam emitted from a laser source (b) is adjusted in terms of position and angle of incidence by a mirror (c) and reflected by a polarizing 90°-beam-splitter cube (d). It only reflects light components with a selected direction of linear polarization and directs them towards the centre of the SLM (e). The light reflected back from the SLM interacts with the polarizing beam splitter again. Now, only parts of the light field with a modified polarization state are transmitted through the beam splitter. This part is spatially filtered by an adjustable aperture (f) before reaching a projection screen.

For good visibility with the human eye, we selected a laser which emits green light of 532 nm wavelength. The laser power of 15 mW (laser safety class 3B) ensures high brightness of the projected patterns, but requires appropriate safety precautions by using, for example, caution-tape lines along the light path to the projection screen. Conventional eye-safe laser pointers may also be considered, but, depending on the classroom environment, the diffraction spots might become too faint.

The microdisplays used in our experiments are active-matrix panels with a 0.7 inch display diagonal. The resolution is 1.400 × 1.050 pixels (SXGA+) with a pixel size of 10 × 10 µm and a pixel periodicity of G = 10 µm. A common 2 mm-sized laser beam provides sufficient coverage of the display area with a diameter of about 200 pixels. The test usage of a beam expander to illuminate the display fully did not improve the quality of the image transformation. The refresh cycle frequencies are 15–100 kHz horizontally and 50–100 Hz vertically, ensuring a flicker-free projection.

3. Diffraction from LCoS microdisplays

We now explain in detail how the core elements, the LCoS microdisplay and the polarizing beam splitter, are used to mimic crystal diffraction. The reflected and modulated light from the SLM encodes the spatial information of our simulated structure pixel by pixel in the form of spatially varying polarization states. Depending on the grey value sent to individual pixels, the polarization vector of the incoming light is rotated by an angle of up to 45° with our given hardware. The rotation of polarization is transferred into a spatially varying amplitude of light waves via a subsequent polarization filtering: the polarizing beam splitter only transmits light that originates from pixels displaying a nonzero grey value. Therefore, greyscale images can be used to mimic, for example, the real-space distribution of electron density (= the atomic form factor and structure factor) in an X-ray or electron diffraction experiment. The modulated light is then subject to interference in the far field, causing an optical diffraction pattern on the projection screen, equivalent to that of a typical crystal diffraction experiment (see Fig. 2[link]).

[Figure 2]
Figure 2
A diffraction study of representative structures. The projection distance is 13.5 m and the chosen fraction of reciprocal space measures 30 cm. (a, left) A real-space structure of two adjacent discs. (a, right) A photograph of the corresponding Airy pattern with horizontal knots in reciprocal space. (b, left) A two-dimensional orthorhombic real-space crystal structure. (b, right) A photograph of the corresponding reciprocal space. (c, left) The same real-space structure as in panel (b), but with uncorrelated displacive disorder. (c, right) A photograph of the corresponding reciprocal space. Note the large-angle diffuse scattering compared with panel (b). (d, left) An electron microscopy image of quasi-crystalline Al71Ni24Fe5 found in the Khatyrka meteorite (Bindi et al., 2015[Bindi, L., Yao, N., Lin, C., Hollister, L. S., Andronicos, C. L., Distler, V. V., Eddy, M. P., Kostin, A., Kryachko, V., MacPherson, G. J., Steinhardt, W. M., Yudovskaya, M. & Steinhardt, P. J. (2015). Sci. Rep. 5, 9111.]). (d, right) A photograph of the corresponding reciprocal space, clearly showing a `forbidden' tenfold symmetry.

Conceptually, it is recommended to construct bright structures (= high scattering amplitude) on a dark background (= no scattering amplitude) to achieve a genuine analogy with a crystal diffraction experiment. This directly relates to the microscopic conditions in the interaction of X-rays or electron beams with atoms or charge densities in a crystal. Practically, it minimizes the intensity of the otherwise strongly dominating specular reflection relative to the rest of the diffraction pattern and, consequently, enhances the visibility and eye safety of the experiment.

Polarization filtering is not essential for the basic function of the setup: even without it, both the unaltered and the rotated polarization components interfere separately and then add up incoherently. The result for both components is effectively the same image transformation. Nonetheless, polarization filtering is highly recommended, since it attenuates the intense specular reflected beam, making the reflections from the displayed structure appear more prominent. In addition, the beam-splitter cube enables collinear incoming and outgoing primary laser beams to avoid geometric distortions.

The total optical density of an SLM can be described as a periodic function given by the pixel array, which is modulated by the image information transferred from the computer. The pixel periodicity of a microdisplay gives rise to a set of intrinsic (hardware-generated) periodic main reflections. Following the theory of modulated structures, the Fourier transform of the object shown on the display can be understood as another set of (software-generated) sharp or diffuse satellite diffractions that is convoluted with the main reflections and therefore repeated with its period.

For non-impaired observation of the diffraction pattern from a displayed structure, a choice of experimentally suitable length scales is required.

We can easily isolate software-generated satellite scattering around the primary beam (000 reflection) as long as its diffraction angle does not exceed the Brillouin zone of the hardware-generated main reflections (see estimation below). Therefore, spatial filtering (angle filtering) by an aperture enables observation of the Fourier transform of the displayed image only. Furthermore, the lattice constant of a simulated crystal structure should significantly exceed the period of the pixel lattice to allow the observation of several orders of satellite reflections within the first Brillouin zone. Conversely, the lattice constant should be small enough to obtain well separated and non-overlapping Bragg reflections. The best compromise depends on the displayed structure and the specific setup at hand.

Given the laser wavelength of λ = 532 nm, the first main reflection (n = 1) from the SLM (lattice constant G = 10 µm) is emitted under a glancing angle of 2θ = 2 sin−1(nλ/G) ≃ 6°. The small maximum angle of the diffracted light cone requires a distance of several metres from the device to the projection screen to obtain a reasonably sized diffraction pattern. At a distance of 10 m the diameter of the first Brillouin zone of the pixel lattice reaches about 0.5 m, which is sufficient for typical classrooms. Owing to the use of collimated laser light, the reciprocal-space resolution function depends only on the distance of the projection screen from our device. Perfectly sharp Bragg reflections will therefore be displayed as a convolution with the laser beam profile (diameter of 2 mm) on the projection screen and will thus appear point like at typical distances. Furthermore, the resolution could be optimized by focusing the laser beam onto the projection screen. The area probed by the laser spot can be readily located by moving a digital `test object' across the screen and observing the diffraction pattern.

4. Software

There are no specialized hard- or software tools needed for addressing our device or for constructing the displayed structures. Any program that is able to show patterns or a movie on a computer screen can be used. However, in order to keep the flexibility that is introduced by our hardware and transfer it into the lecture hall, we developed a script based on the Python programming language (see supporting information). Our program starts with periodically arranged white discs (= atoms) on a black background and includes a simple and intuitive user interface to manipulate the displayed pattern. A number of sliders and switches are located at the sides of the screen to change the crystal parameters for designing both simple and complicated periodic scattering landscapes (Fig. 3[link]). The code was constructed such that it includes the following features, partially adapted from Harburn et al. (1975[Harburn, G., Taylor, C. A. & Welberry, T. R. (1975). Atlas of Optical Transforms. London: G. Bell & Sons.]):

[Figure 3]
Figure 3
The user interface. A Python program with a simple graphical user interface was developed for designing interactively configurable two-dimensional crystal structures. The sliders and switches are functionalized for continuously changing the parameters describing the simulated crystal. Here we show a disordered trigonal structure with a two-atom unit cell and vacancy defects.

(i) It displays two-dimensional Bravais lattices with continuously tunable lattice parameters a, b and α to access all lattice types.

(ii) It introduces a second `atom' per unit cell with continuously tunable relative positions Δa and Δb to allow the introduction of translational symmetry operations, for example glide planes or centred structures.

(iii) The sizes of both atoms are independently tunable, from a single pixel to a fully covered film, to manipulate the structure factor and influence the selection rules.

(iv) The eight-bit grey levels for both atoms are independently tunable to manipulate the structure factor and influence the selection rules.

(v) It includes random positional disorder with a continuously controllable magnitude to address thermal disorder or a solid–liquid phase transition.

(vi) It has a continuously changeable density of uncorrelated vacancy defects to address common lattice defects.

(vii) Continuous rotation or translation of the lattice is possible, to introduce real-space sample positioning effects.

5. Examples of classroom activity

Using our projection device and the program discussed above, we outline a 90 min lecture for first-semester mater­ials-science students in the last third of an introductory course on crystallography. Its purpose is to introduce the idea of diffraction, providing intuitive access and hands-on experience. After an introduction to scattering theory, we start with a simple calculation of the lattice constant of a tea strainer that is used experimentally as a diffraction grating for a laser pointer. This lets the students reconsider and transfer the idea of crystallographic diffraction to the optical and macroscopic regime. We utilize an anonymous smartphone- or computer-based online polling system that enables either multiple-choice or text/word-answer questions to obtain live feedback about the students' learning progress. At several points we interrupt the lecture by asking questions about the introduced material, for example How would the diffraction pattern change if we increased the lattice parameters?, and collect the answers. We then demonstrate the effect with our setup, compare the right answer with the student poll and discuss it.

Furthermore, we demonstrate the relation between real and reciprocal space with several examples by projecting both spaces next to each other (Fig. 4[link]). Beginning with simple structures, such as vertically and horizontally aligned parallel lines, we introduce all two-dimensional crystal lattices by subsequent symmetry reduction through continuous change of the lattice parameters. In addition, we demonstrate aspects such as the impact of real-space translations or rotations on reciprocal space. By increasing or decreasing the lattice constants and observing the corresponding diffraction pattern, the term `reciprocal space' becomes self-explanatory. Friedel's law and selection rules resulting from centred structures or glide planes are introduced by adding a second basis atom and moving it gradually towards particular positions. By tuning the atomic diameters or grey values, and thereby the scattering amplitude, we address the concept of the atomic form factor. Final experiments involve the effects of positional disorder and vacancy-defect density to approach further applications of crystal diffraction beyond standard structure determination.

[Figure 4]
Figure 4
A live demonstration of a diffraction experiment (students' view). For the classroom activity we projected the real-space image (left) directly next to the reciprocal-space image (right). The use of a green laser with 15 mW optical power ensures good visibility of the diffraction pattern.

The immediate feedback and visual proof of the correct answers help the students to strengthen critical self-reflection about their learning progress. For the lecturers it is vital feedback: we can see which of the subjects are not understood and can immediately react by including additional and interactive ad hoc demonstrations of diffraction.

6. Summary

We have developed a novel concept for teaching crystallographic diffraction that supersedes the capabilities of current approaches. With a modified low-cost commercial video projector, we are able to optically simulate crystallographic diffraction experiments. In particular, we benefit from the dynamic aspect of the concept, which enables manipulation of the crystal in real time. We provide a Python program with a simple and intuitive user interface that can engineer a broad range of two-dimensional crystal structures. With this, undergraduate students can learn about modern crystal diffraction with hands-on experience. The combination of our setup with a crystallographic visualization program such as VESTA  (Momma & Izumi, 2008[Momma, K. & Izumi, F. (2008). J. Appl. Cryst. 41, 653-658.]; Momma, 2019[Momma, K. (2019). Visualization for Electronic and Structural Analysis, http://www.jp-minerals.org/vesta/en/.]) opens up a huge variety of valuable teaching ideas for a total price of approximately 200 USD.

In addition to our given examples, the idea of an optical simulation can be applied to demonstrate diffraction from incommensurate structures or other systems of great complexity. Also, the dynamic evolution of diffraction patterns (see supporting information) from temporal processes such as molecular dynamics or critical scattering during phase transitions can be demonstrated flicker free and without the need for additional computational power for calculating Fourier transforms. In particular, the use of all three SLMs, which can be addressed separately by their individual colour channel (R, G and B), allows us to encode different species of atoms and display their individual scattering contributions.

In conclusion, we gain a steep learning curve for students by providing an interactive framework that simulates realistic diffraction scenarios. Using our all-optical high-resolution real-time image transformation instead of a digital Fourier-based simulation, students will get a realistic impression and more intuitive understanding of diffraction experiments.

The supporting information consists of a zip archive containing three files: (i) the Python source code, oXRDsimu.py; (ii) a video simulation of a typical single-crystal X-ray data collection experiment with a randomly oriented crystal; and (iii) a video showing how a zoom into a quasicrystal in real space results in a zoom out of the diffraction pattern in reciprocal space.

Supporting information


Acknowledgements

We thank Jakob Schaab, Amadé Bortis and our students who participated in the crystallography course. We thank Johanna Nordlander, Lukas Kuerten and Wiebke Herzberg for proofreading of the manuscript. Manfred Fiebig thanks ETH Zurich and CEMS at RIKEN for support of his research sabbatical.

References

First citationArmitage, D., Underwood, I. & Wu, S.-T. (2006). Introduction to Microdisplays. Chichester: John Wiley & Sons.  Google Scholar
First citationBindi, L., Yao, N., Lin, C., Hollister, L. S., Andronicos, C. L., Distler, V. V., Eddy, M. P., Kostin, A., Kryachko, V., MacPherson, G. J., Steinhardt, W. M., Yudovskaya, M. & Steinhardt, P. J. (2015). Sci. Rep. 5, 9111.  CrossRef Google Scholar
First citationChitode, J. S. (2008). Digital Signal Processing. Pune: Technical Publications.  Google Scholar
First citationConvert, F. & Miege, B. (1992). J. Appl. Cryst. 25, 384–390.  CrossRef IUCr Journals Google Scholar
First citationDatta, A. K. & Munshi, S. (2016). Information Photonics: Fundamentals, Technologies, and Applications. Boca Raton: CRC Press.  Google Scholar
First citationGonzalez, R. C. & Woods, R. E. (2017). Digital Image Processing, 4th ed. London: Pearson.  Google Scholar
First citationHarburn, G., Taylor, C. A. & Welberry, T. R. (1975). Atlas of Optical Transforms. London: G. Bell & Sons.  Google Scholar
First citationMomma, K. (2019). Visualization for Electronic and Structural Analysis, http://www.jp-minerals.org/vesta/en/Google Scholar
First citationMomma, K. & Izumi, F. (2008). J. Appl. Cryst. 41, 653–658.  Web of Science CrossRef CAS IUCr Journals Google Scholar
First citationNeder, R. B. & Proffen, Th. (1996). J. Appl. Cryst. 29, 727–735.  CrossRef CAS Web of Science IUCr Journals Google Scholar
First citationProffen, Th. & Neder, R. B. (1997). J. Appl. Cryst. 30, 171–175.  CrossRef CAS Web of Science IUCr Journals Google Scholar
First citationWelberry, T. R. & Jones, R. D. G. (1980). J. Appl. Cryst. 13, 244–251.  CrossRef CAS IUCr Journals Google Scholar

© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767
Follow J. Appl. Cryst.
Sign up for e-alerts
Follow J. Appl. Cryst. on Twitter
Follow us on facebook
Sign up for RSS feeds