A LASER PLOTTER FOR OPTICAL PROCESSING

by BAILEY HENRY JONES III, B.S. in E.E.

A THESIS IN ELECTRICAL ENGINEERING

Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for the Degree of

MASTER OF SCIENCE IN ELECTRICAL ENGINEERING

Approved

May 1982 ACKNCWLEDGMENTS

I would like to thank Dr. Jchn F. Walkup and Dr. mThoma s F. Krile for their g-uidance and patience during the completion of this thesis. I am also indebted to the staff of the Cptical Systems Lab, whose support and friendship made this a particularly enjoyable task. This volume is dedicated to the memory of my mother, who, had she lived to see it, would have been very proud.

This work 'vvas supported by AFCSR grant #79-0076 CONTENTS

Page ACKNOWLEDGMENTS ii LIST OF TABLES vi LIST OF FIGURES vii

CHAPTER 1. INTRODUCTION 1

CHAPTER 2. AN OVERVIEW OF THE SYSTEM 6

CHAPTER 3. SUBSYSTEMS 12

3.1 Image Data Processing 12 3.1.1 Computers 12 3.1.2 Generating the Image Data I3 3.1.3 Data Conversion l4 3.2 Interface Components 19 3.2.1 Purpose of the Interface I9 3.2.2 The Random Access Mode Interface ... 20 The OUT Instruction 24 Address Decoding 26 Buffer Memories 27 D/A Converters 29 3.2.3 The Sequential Access Mode Interface . 30 3.2.4 Shutter Timing Control Circuit .... 33

111 3-3 Laser and Shutter Sutsystems 37 3.3.1 Laser '37 3.3.2 A/O Shutter yj 3.3.3 A/ Shutter Driver 39 3.4 Beam Forming ptics 44 3.4.1 General and 1-D Plotxing 46 3.4.2 Flotting Holograms . . . . • 50 3.. 5 Scanning Mirrors 34 3.6 Software- '^'^ 3.6.1 Software Organiza-cion '^'c 3.6.2 Data Processing Sof-ware 59 NORML 59 TRANS 60 FILZ and FILL 65 HARM 65 CGHI 66 LAEEL 67 3.6.3 Cperating Systems 69 XYPLCT/XYPLT2 73 HGLC/HCLC2 73 lDrLCT/lD?LT2 l^ LSrELL 73 3.6.^ Maintenance Scitware 79 rv^IRALI cC

CALBR8 iv FSET 82

CHAPTER 4. APPLICATIONS 83 4.1 General Output Device 83 4.2 Computer Generated Holography 83 4.3 Phase Masks 85 4.4 Plotting Color Images 86 4.3 Laser Plotter as a Scanner 87

CHAPTER 3. RESULTS AND EXAMPLES 92 3.1 Alphanumerics 92 3.2 Gray Scale 92 3.3 Plotting Images 94 3.4 Computer Generated Hologram 94

CHAPTER 6. FUTURE EXPANSION AND CONCLUSICNS . . 97

REFERENCES 104

APPENDICES 106 A. Background on CGH's 106 ?. Characteristics of Panatomic-X Film .... 110 C. Wiring Diagrams and Circuit Layout .... II3 D. Program Listings 120

V LIST OF TABLES

Table Page

3.1 VAX 11/780 Calling Sequence 18 3.2 Typical BASIC Sequence in Normal Mode ... 24 3.3 Typical BASIC Sequence in Extended Mode . . 23 3.4 Set Up Data for General and 1-D Plotting . . 48 3.3 Set Up Data for Computer Holography .... 51 3.6 Scanning Mirror Specifications '^'^ 3.7 ASCII Character Set 63 3.8 Format for Input to HARM (^(^ 3.9 Characters Available for LSPELL Routine . . 68 3.10 Output Port Designations 70 3.11 BASIC Output Sequence for RAM Plotting ... 71 B.l Characteristic Curve Data for Panatomic-X Film 112 C.l Compucolor II Interface Bus 113 0.2 44 Pin Interface Bus 114 0.3 RS-2^2C Interface Pin Designations II5 0.4 D/A Converter Pin Designations II6

VI LIST OF FIGURES

Figure í Page

2-1 Block diagram of the Laser Plotter 7 2-2 Photograph of the Laser Plotting System . . 8 3-1 Characteristic curve for Panatomic-X film . 15 3-2 Block diagram of RAM Interface 22 3-3 RAM Address Decoding Circuits 27 3-4 RAM Buffer Memory Circuits 28 3-5 SAM Interface Circuit 31 3-6 Shutter Timing Control Circuit 34 3-7 Shutter circuit timing diagram 35 3-8 A/O Shutter Driver Circuit 40 3-9 A/O Shutter driving signals 42 3-10 Diagram of beam forming optics for (a) General and 1-D Plotting, and (b) CGH Plotting 45 3-11 Photograph of circular pixels 47 3-12 Photograph of rectangular pixels 53 3-13 Coordinate mapping on film plane 55 3-14 Pixel arrangement for CGH plotting 76 4-1 Using the laser plotter as a scanning detectDr 88 4-2 Using the laser plotter to scan a transparency 90

vii 5-1 Demonstration of alphanumeric capability ... 93 5-2 A gray scale made with the laser plotter ... 93 5-3 "Wheel" image plotted in General Plotting Mcde 95 5-4 Computer-generated hologram of "Double T", (a) Plotted CGH 96 (b) Reconstructed Image 96 C-1 Layout of Shutter Timing Board 117 C-2 Layout of RAM Interface Board 118 C-3 Layout of SAM Interface Board 119

VI11 Chapter One Introduction

Optical processors are gaining wide acceptance in, and out, of the laboratory because of their potential for high speed parallel processing. Information is processed in these systems in the form of modulation of a laser beam or other optical carrier. This modulation may be either spatial or temporal, or both. Spatial modulation is often accomplished through the use of optical transparencies. A transparency which is placed in the optical (light) path of the processor spatially modulates the light passing through it. The transparency may contain data, such as an image to be transformed, or a processing mask which may function as a transforming element in the optical system. Coherent light is a complex-valued quantity which may be represented mathematically by two terms, a real amplitude and a phase factor. Both the amplitude and the phase of a light wave can be affected by passing the light through an optical medium. The amplitude of the light which passes through the medium is dependent on the medium's intensity transmittance. This kind of modulation is easily performed with photographic film, indeed, this is the basis of photography. As a light wave travels through any optical medium, it undergoes a phase shift. The size of the phase shift depends both on the thickness and the index of refraction of the medium. In practice, it is difficult to control the phase shifting properties of a piece of film precisely, or independently of the amplitude. The film base itself is rarely optically flat and the thickness of the emulsion varies with the transmittance of the developed film. The phase shifting characteristics of film are therefore generally undesirable and are often eliminated by mounting the film in a liquid gate.(l) Thus, for most purposes, purely amplitude- modulating transparencies are used in optical processors. When it is necessary to introduce a complex quantity into a system, techniques which allow one to represent these quantities with purely real functions are employed. These techniques are perhaps most commonly used for the realization of holographic filters (e.g. Vander Lugt filters) and computer generated holograms. A popular way of generating optical transparencies is to photograph the output of a computer-driven X-Y plotter. The desired function is generated in the computer and drawn by the X-Y plotter on a sheet of paper. This image is then photoreduced to the required size. The principal disadvantage to this technique is that the ink and paper format of the plotter is best suited to binary images; it is difficult to represent more than two levels of contrast (unless halftone techniques are employed). In another common approach the X-Y plotter is replaced with a CRT (cathode ray tube). The displayed function is photographed directly off of the CRT screen. Using the CRT, .many levels of contrast are available, however pincushion dis-tortion and other CRT-related distortions must be eliminated before satisfactory results can be achieved. ne problem inherent in both of these approaches involves the photoreduction process. Often several transparencies will be cascaded in an optical processor. These transparencies cannot be properly aligned unless they are all exactly the same size. This requires that all photographs be taken at precisely the same distances, etc, or that all of the functions be photographed simultaneously, on a single frame of film. The Laser Plotter This thesis describes a third approach--the computer-controlled laser plotter, which has been shown to be quite effective for generating optical transparencies. (2) Here the generated function is plotted, point-by- point, directly onto a frame of 35mm film with a focused laser beam, thus avoiding photoreduction completely. The position of the beam in the film plane is controlled by a , which also determines the length of the exposure at each point. The laser plotter achieves the gray scale capabilities absent in the digital X-Y plotter while avoiding the distortion and complexity of CRT-based systems.

The laser plotter developed in this thesis is capable of generating amplitude masks and computer generated holograms in a film plane of 1024x1024 points, with a contrast resolution of 256 gray levels. The system was designed for operation with a minimum of training, and uses interactive operating software to achieve this goal. Two different hardware interfaces and three operating systems were designed, allowing for operation in six different plotting modes, including an

It should be noted that while X-Y plotters and some CRT based systems plot "point-to-point" (that is, in line segments), the laser plotter and most modem graphics displays plot "point-by-point", with discrete dots. alphanumeric capability. This is a general purpose system, easily expandable, which can perform in a variety of applications. Thesis Organization Chapter Two of this thesis presents an overview of the laser plotter, outlining its operation and components. These components are examined in detail in Chapter Three, which describes the design and function of every part of the system. Chapter Four describes the present applications of the laser plotter and suggests some future uses , such as the generation of phase masks. Several test results are presented in Chapter Five which demonstrate the system's ability to plot both real and complex images (holograms). Chapter Six concludes with a discussion of possible future expansion of the laser plotter and discusses the fundamental limitations of the system. Further documentation, including complete interconnection diagrams and a listing of the system software can be found in the appendices. Chapter Two An Overview of the System

The laser plotter is designed to generate transparencies for optical processing. This is accomplished by "writing" on photographic film with a focused laser beam. The area on the film accessable to the laser beam is called the film plane. The film plane measures 1.7 cm square and is divided into a rectangular grid of 1024 by 1024 equally spaced points. The laser plotter "writes" a small dot, or pixel, of approximately uniform transmittance at each of these points. As many as 256 different transmittances (gray levels) are available for each pixel. Figure 2-1 is a block diagram of the laser plotter. A photograph of the system is shown in Figure 2-2. The laser plotter is a hybrid electro-optical device. Computers and electronic control circuitry are interfaced to an optical system which defines the path, shape and intensity of the light beam which ultimately exposes the film. The optical system consists of a laser light source, an acousto-optic shutter, a pair of scanning mirrors, the camera and film, plus the mirrors, lenses and other optical paraphernalia which define the light 7

0 +^ -P o rH f-t,

Q)

O

e cd Q£ cd •H O O

^ u 0) 3 1 +J iJ +J U p 0) 0 JZ Q< m <

u (U u •P o 4J > 3 -H u .C !-i i^

C •H -P

0) ra

x: -p

CH O x:

cd r^ O -P o

C\J I C>v2

Q)

•H path of the system. The electronic control elements include a minicomputer for information processing, a microcomputer/terminal and its interface, and driver circuitry to operate the acousto-optic shutter and the scanning mirrors. These components are discussed at length in the following paragraphs and in Chapter Three.

Computers and Electronics As shown in Figure 2-1, the information and control path of the laser plotter begins with the VAX II/78O minicomputer. Here, image data to be processed and plotted enters the system. This data may be a real image entered via a television camera, or a mathematical representation (such as a computer-generated hologram) created in the computer itself. Frograms stored in the VAX 11/780 normalize these images and translate them into arrays of control data which are then transmitted to the Compucolor II microcomputer/terminal and stored on floppy disks. The microcomputer then feeds this data to the interface where it is converted into control signals. These signals are the inputs to the A/O shutter driver and the X and Y axis mirror drivers. 10

The Optical Svstem The light source for the optical system is a HeNe laser, the output of which is passed through an acousto- optic (A/O) modulator, and onto a metal plate. When the modulator is excited by the A/O shutter driver, a portion of the laser beam is diffracted through a small aperture in the plate. It is this portion of the beam which eventually makes its way to the film plane. By controlling the excitation in the modulator, the beam can be gated on and off, effectively creating an electro-optic shutter. The laser beam which emerges from the A/C shutter is much too intense for our purposes. The collection of lenses, filters and apertures labelled "Beam Forming Optics" in Figure 2-1 shapes and filters the beam to a size and intensity suitable for plotting. The final two elements the laser beam encounters before exposing the film are the two galvanometer scanning mirrors. Each mirror can rotate independently about an axis under control of the mirror drivers. The mirrors are mounted so that they deflect the laser beam either vertically or horizontally. In this way, each point in the 1024 by 1024 point film plane can be accessed by the laser beam. 11

0"perating the Svstem The laser plotting system is operated from the keyboard of the microcomputer using the system's library of interactive software. These programs, written in BASIC and Fortran, are designed for users having a minimum of experience with the system.- This thesis, and the instructions contained in the software, should be sufficient for successful operation of the laser plotting system. Chapter Three Subsystems

3.1 Processing the Data

3.1.1 Computers The laser plotting system is designed around two computers. These are the Intelligent Systems, Inc. Compucolor II microcomputer and the Digital Equipment Corp. VAX 11/780 minicomputer. The VAX II/78O acts as the primary input device, accepting the images (or holograms) we want to plot and translating them into exposure data for the laser plotter. The Compucolor II uses this exposure data to control the plotting of the image. The Compucolor II is an eight bit microcomputer based on the Intel 8080 family of microprocessor devices. The microcomputer can be programmed in either assembly language or BASIC, with the BASIC compiler. On-board memory includes the BASIC compiler in ROM (read only memory) and 32 Kbytes (kilobytes) of random access memory (RAMK A 5 1/2 inch drive which has a storage capacity of 51-2 Kbytes per disk side is also available. programs and processed

12 13 exposure data are stored on these disks. The Compucolor has an eight color display which can be controlled by a variety of graphics commands. These commands can be accessed through EASIC programs or with special keys on the keyboard. The color display is used extensively with the interactive operating software to display and explain program concepts to the user. The Compucolor II is used both as a microcomputer/controller, to control the laser shutter and scanning mirrors during the plotting of an image, and as a data communications terminal to allow remote access to the VAX II/78O. The VAX 11/780 is a powerful 32 bit minicomputer. Mass storage is provided on two 28 Mbyte (megabyte) hard disk drivers and a magnetic tape unit. Interactive terminals (including the Compucolor II) and dot matrix printers are used for system input and output. A Comtal VISION ONE/20 image display system is also included in this facility. The VAX II/78O can be programmed in both FORTRAN and MACRO assembly language by means of the system editor.

3.1.2 Generating the Data There are basically three ways to enter unprocessed image data into the VAX II/78O. In the first method 14 transmittance data is entered by hand for each point in the image. This approach is tedious, but it is straightforward and useful for entering simple images into the computer. Another approach is to generate the image in the VAX itself. This is particularly easy if the function to be plotted is known and can be expressed in closed form as an equation in a Fortran program. Often the image we want to plot is generated in the computer as the output of some image processing operation (e.g. computer generated holography). A third way of loading images into the computer uses a TV camera to read a photographic image directly into memory via the Comtal image display system. Other electronic devices such a photodetector arrays could be used as well. Additionally, a small library of digitized images is available, stored on magnetic tape and disk.

3.1.3 Data Conversion Before an image can be plotted on film it must be quantized, normalized and properly fitted to the characteristic curve of the film. This curve relates transmittance of the developed film to exposure times. Figure 3-1 shows the characteristic curve for Fanatomic-X 15

Photogra^hic Density a\ vO (N o d -r T- Intensity Transmittance

C o B o o ÍN

X o o I - 00 r^ fN '-' o •H e c -p c o nJ ^ vo

o CH

O O o \r> fN *— > 5-1 :3 o o O O 3 • H •H> CQ I •H í-l tl Q) > +^ O 00 — (N ••1 9J cd cd o

o c S 04

0) u cí O O •H

in d (S3U) 9jnsoâx3 001 16 film.^^"* This monochromatic 35roiii film was used throughout the development of the system and is further discussed in Appendix B. Many photographic films have a maximum intensity transmittance which is less than unity due to the "gross fog" transmittance. This value is the transmittance of the film base, onto which the emulsion is bonded. Panatomic-X film has a maximum transmittance of O.5 which corresponds to a density of 0.3 (since density is a logarithm of the reciprocal of the intensity transmittance). Therefore the useful range of transmittance for this film is 0.0 to 0.5. All image transmittances must be normalized to this range. Once this has been accomplished the normalized image transmittances are compared, point by point, to the film curve in Figure 3-I, which is stored in the VAX's memory. The exposure times are controllable from zero to a maximum of five milliseconds in either 64 or 256 steps. For Panatomic-X film, an exposure of five milliseconds will expose the film to the region of maximum density (minimum transmittance) on the film curve. The relative exposures in Figure 3-I are interpreted by the interface as fractions of the maximum exposure time. If a film other than Fanatomic-X is used the system will probably have to be recalibrated 17 as described in Sections 3.2.4 and 3.6.4. Because of the superior speed and data handling capabilities, all but the simplest data processing in the laser plotting system is done on the VAX 11/780 and Comtal systems which are remote from the rest of the laser plotter. The components are connected by a 250 foot shielded cable which connects the RS-232C interface on the Compucolor II to the VAX's DZ-11 interface unit. The Compucolor's data rate is usually set at the VAX's default rate of 2400 baud (bits per second), with one stop bit, although data rates of from 100 to 9600 baud are available. The baud rate and number of stop bits are selectable on the microcomputer with special escape (ESC) sequences on the keyboard. The sequence for calling the VAX II/78O is listed in Table 3'1' With the Compucolor II in terminal mode, the "A7ON" key sets the correct stop bit and the sequence "(ESC) F" sets up full duplex mode communication with the VAX. Variations of these sequences are discussed in Appendix C of the Compucolor II Programming Manual. 18

Table 3.1 VAX 11/780 Calling Secuence

KEY ACTION

CFU RESET Reset, set terminal mode.

A70N Selects one stop bit.

ESC R Sets baud rate 5 to 2400.

ESC Selects full duplex F mode (all inputs to RS-232C interface). 19

3.2 Interface Components

3.2.1 Purpose of the Interface Cnce the image has been normalized and fitted to the characteristic film curve in the VAX II/78O it is stored on the Compucolor II's floppy disk. From the disk this data can be output to the interface under control of one of the three operating system programs described in Section 3*6.3« These programs read exposure data from the data disk and generate position data for each point in the image. This position and exposure data is converted by the interfact into analog control signals which both determine the positions of the galvanometer scanning mirrors and control the exposure time at each point in the film plane. Two separate interface circuits have been designed for the laser plotter. These circuits make possible two different plotting modes, Random Access Mode (RAM) and Sequential Access Mode (SAM). In RAM plotting, the microcomputer outputs both position data (X and Y coordinates) and exposure data to the interface. This makes it possible to access any point in the film plane at any time during a plot. In SAM plotting, on the other hand, the interface receives only exposure data from the 20 microcomputer—the position data is generated on-board the interface itself. This requires that points on the film plane be plotted always in the same fixed sequence so that the user knows the order in which to arrange the exposure data. The interface is housed in a cabinet which holds the four circuit boards which make up the interface. Two of these boards hold the two D/A converters. A third board contains the shutter timing control circuit. The fourth board is either the RAM interface or the SAM interface board, depending on the application. The cabinet contains four 44 pin card edge connectors wired in parallel. This is so that the positions of the four boards in the interface are interchangeable--each board will function properly in any of the connectors. A fifth board, used for trouble-shooting the interface, can be inserted in place of any board in the interface. This test board allows access to all of the signals that the interface uses.

3.2.2 The Random Access Mode Interface The RAM interface can be operated at two levels of image resolution, referred to as the normal and extended operating modes. In the normal mode, images of up to 21

256 by 256 points and 64 gray levels can be plotted. The extended mode allows images of up to 1024 by 1024 points and 256 gray levels. A block diagram of this interface is shown in Figure 3-2. Position data (X and Y coordinates) from the computer are stored in two buffer memories, each comprising ten single bit data latches. In the normal operating mode, eight bits are needed to define the 256 discrete positions along the X and Y axes in the film plane. Ten bits are required to resolve 1024 points on each axis in the extended mode. The stored position data is then converted to a 0-10 volt analog signal by means of two ten bit digital to analog (D/A) converters. These two signals are inputs to the mirror drivers which, in tum move the two galvanometer scanning mirrors. Sxposure data is stored in an eight bit buffer memory where it is accessed by the shutter timing control circuit. This circuit is on a separate board in the interface cabinet and is used by both the RAM and SAM circuits. The shutter timing circuit generates a pulse, the width of which is proportional to the eight bit number (0 - 255^ stored in the buffer. A pulse width of "0" does not expose the filmat all while a pulse width of "255" will expose the film to its maximum 22

n

u 01 0 i JJ -u (U r O cd CH

+^

irt . Jí 0 1 •o o c cti I >. ">

•o cti (N I n 3 • H

0) 3 tn i3 V u •c O

CoM •^ I m

•^ 0 u 4J & ÍN -M 0) •H I 0 3» O X -< •o I 0» m

w o n ^ m 0) ^ i -S 8 a oj < - 23 density. These numbers come from the relative exposure times of Figure 3-1« In the normal operating mode, the numbers are derived by multiplying the relative exposure times (0 to 63) by four. In the extended mode, the relative exposure times are used directly. The maximum pulse width (corresponding to the number 255) is dependent on the type of film being used and the power of the laser source. For Panatomic-X film and the laser and beam forming optics described in later sections, this value is five milliseconds. The same eight data lines feed all of the latches and the data on these lines is constantly changing. By clocking (or enabling) the latches at precisely the right times, only the desired data is stored in each buffer memory. The enabling pulses are generated by the address decoding circuits which monitor the eight address lines from the microcomputer. When a particular address (the numbers in the decoder boxes in Figure 3-2) is sensed by its decoder, a short enabling pulse is delivered to the corresponding latches which receive and store the data. Note that although the EN247 signal is generated on the RAM interface board, the corresponding memory buffers are on the shutter timing control board. A 24

jumper connects the memory and this signal.

The OUT Instruction A separate command from the microcomputer is required to enable each of the five buffer memories. •This command in Compucolor II BASIC is the OUT instruction, "OUT I,J", where I is an eight bit (0-255) address and J .is an eight bit data byte. So if, for example, we want to store the number 213 in the buffer memory which corresponds to address 239, we would execute the instruction "OUT 2 39,213". In the normal operating mode, three OUT instructions are needed to specify the X and Y positions and the exposure time at each point in the film plane. A typical program sequence is listed in Table 3.2. This sequence moves the beam to position (128,64) in the 256x256 point film plane and exposes the film at that point for (32/256^x5 ms = .625 ms.

Table 3.2 Typical BASIC Sequence in Normal Mode Line Number Instruction 10 OUT 239.128 20 OUT 253.64 30 OUT 247,32 25

In the extended mode, five instructions are necessary. Table 3*3 shows a typical programming sequence in this mode.

Table 3.3 Typical 3ASIC Sequence in Extended Mode Line Number Instruction 10 OUT 239»128 20 OUT 254,3 30 OUT 253.64 40 OUT 251,1 50 OUT 247,128

Recalling that addresses 239 and 254 correspond to the upper eight and lower two bits, respectively, of the X coordinate we see that this sequence specifies an X value of (128x4 + 3 = 515)- Similarly, the Y coordinate specified is (64x4 + 1 = 257). Thus the beam is moved to position (515,257) in the 1024x1024 point extended film plane. This point on the film is exposed for (128/256)x5 ms = 2.5 ms. When plotting in the normal mode, the lower two bits of each coordinate (addresses 254 and 251) are set low at the beginning of the plot to avoid ambiguous states which may occur when power is applied to the interface. 26

Address Decoding The five address decoding circuits are shown in Figure 3-3. Each circuit consists of a 74LS133 NAND gate and an inverter which together form a nine input NAND gate. The output of this gate will be high only when all nine inputs are high. Ey inverting certain input lines (address bits) we can select the address which will be detected by each circuit. For example, U9 is set to detect a 239 address. In binary, 239 is 11101111 so we invert the fifth address bit, a4. To detect address 247 (11110111) we invert the fourth line, a3, etc. The ninth input to each decoding circuit is the l/O W (input/output write) signal from the microcomputer which goes high whenever an OUT instruction is executed. This address decoding scheme is used in the SAM interface as well.

Buffer Memories Figure 3-4 shows the five 74LS75 quad latches which make up the four X and Y position buffer memories. When the enable lines (pins 4 and I3) are high the outputs (xO - xl, x2 - x9, yO = yl, and y2 - y9) of the buffer latches follow the inputs (dO - d7)• When the enable line goes low, the data is held on the output lines. 27

ô*5v

Figure 3-3- RAM Address Decoding Circuit. X. • c x_

1- 5 EN239. EN239 •EN:39 +5v- +5v

— 8

UIO Ull

1 EN254 EN253 .EN253 OÎD +5v .GND

U12

y. 5- EN253. EN253 +5v. GND d.

^8

Figure 3-4. RAM Buffer Memory Circuits 29

The address and data lines from the microcomputer are synchronized so that the enable pulses from the address decoders coincide with the appearance of the corresponding data at the inputs to the latches.

D/A Converters The two ten bit data words from the memory buffers are applied to two Analog Devices ADC-I03 digital-to- analog converters which generate proportional analog control signals. Each D/A converter is mounted on a separate board in the interface cabinet. The signals range from zero to 10 volts, in 1024 steps, and serve as inputs to the X and Y mirror drivers to be discussed in Section 3-5 •

3.2.3 The Sequential Access Mode Interface The Sequential Access Mode (SAM) interface board is used to plot computer-generated holograms and images with the HOLO/HOLO2 and XYPL0T/XYPLT2 operating systems. The SAM interface generates X and Y coordinates on-board while receiving relative exposure data from the Compucolor II. This makes SAM plotting three to five times faster than the RAM interface since the microcomputer executes only one OUT instruction (instead of three or five) for 30 each point in the image. The SAM circuit, shown in Figure 3-5, uses the same address decoding technique as the RAM interface, but only two addresses are needed. As before, address 247, decoded in U3, enables the buffer memory on the shutter timing circuit board which holds the exposure data. The SAM interface basically consists of two twelve bit binary counters, one for the X coordinate and one for the Y coordinate. Each twelve bit counter consists of three 74LS161 four bit counters. The lower 10 bits of each counter are the inputs to the D/A converters discussed in the previous section. The Y coordinate counter (U7,U8,U9) is clocked by the EN247 signal. Thus, as each exposure value is loaded into the buffer memory on the shutter timing control board, the Y counter, and hence, the Y axis mirror, is advanced by one. When a full column has been plotted, the X counter (U4,U5,U6) is advanced to the next column. The clock for the X counter comes from the carry bit of the Y counter. The SAM interface is designed to plot NxM point images, where N is less than or equal to 1024 and M is either 1024, 512, 256 or 128. Since both counters will normally count to 4096, some means of clearing each counter when the maximum coordinates are reached is 31

0— ll I'

a^ 10 X —* s_ X

o— •

-p i > •H ^ O 0— l' í^ <•— •H O f^ ~" Q) X 1 """ C 1 ^^ 3

X — -p 0— • ( •

OQ

0— Il' 0— -o' u I 0 m'—m rH X U 1 ~~ X 1 ^ «^^ 3 o X -_ •H 0— • 32 needed. The X counter must be cleared after N columns and the Y counter must be cleared after M points (one column) have been plotted. The Y counter carry bit both increments the X counter and clears the Y counter at the end of each column. This carry bit is the next highest (unused) bit of the counter. For example, if we are counting from 0 to 1023 (10 bits) , the carry bit is the llth bit of the counter. Then, when the 1025th clock pulse (corresponding to the Ist clock pulse of the 2nd column) advances the Y counter, the llth bit goes high and clears the counter back to zero while simultaneously advancing the X counter to begin the next column. A four pole DIP switch on the SAM interface board selects the correct carry bit for each of the four available column sizes (128, 256, 512, 1024). The X counter is cleared by a separate signal from the EN253 address decoder, U2. This signal is ORed with- the carry bit from the Y counter, in UIO, so that EN253 also clears the Y counter. Both counters are cleared at the beginning and end of a plot. Plotting with the SAM interface board is quite simple. First an OUT 253,K instruction (the value of K is not important—any integer from 0-255 can be used) is executed. This clears both the X and Y counters to zero. Then, using the CUT 247,J instruction, the microcomputer 33 outputs, sequentially, the relative exposure data for the image to be plotted starting with the data value corresponding to the coordinate (0,0), then (0,1), (0,2), etc, until the plot is completed. When the complete image has been plotted, another OUT 253,K instruction clears the counters for the next plot.

3.2.4 Shutter Timing Control Circuit The shutter timing control circuit is illustrated in Figure 3'^' This circuit is mounted on a separate board in the interface cabinet. The circuit timing diagram is shown in Figure 3-7. The Shutter Control signal is the output of an RS flip-flop made from two of the four NCR gates on U9. Another gate of U9 is used to invert the EN247 signal from the address decoder. U5 is a high speed clock circuit designed to generate 256 clock pulses during the maximum exposure time of 5 nis. Ul and U2 are 74LS161 four bit counters cascaded to form a single eight bit synchronous counter. When the EN247 signal is received from the RAM or SAM interface board, the eight bit exposure data (tO - t7) is stored in two quad latches, U7 and U8. As the exposure data is stored, a monostable multivibrator, U6, generates a 1.8 ms delay signal which corresponds to the tum-on delay of the A/C 3^

a.b, a.a. b.a, b, nS ^sS ^6 y 7 0 1 12 2 3 3 2 I I I I I I I U3 - U4 X A-B A-B

b. — b, i "O -- "3 ? 4 /

Ul U2 X T-nT T

R2 é t 022iíf 5 K JL lOOpf 500lOKK ~-~ lll 11

U6 U5 I TT

lO pf ^ ? Shutter 1 Contro !0K Rl U9 ^ 1" +5 o I TXT EN247

Figure 3-6. Shutter Timing Control Circuit 35

EN247

Delav 1.8 mS

Counter Enable 0 - 5 mS

Counter Outputs

A = B

Shutter Control

Figure 3-7. Shutter circuit timing diagram. 36 shutter driver. This signal clears the counters and sets the flip-flop. The output of the flip-flop and the delay signal are counter enable signals which turn the counters on and off. After the delay, Ul and U2 begin to count clock pulses from U5. Then the four bit binary magnitude comparators, U3 and U^, compare the stored exposure data (aO - a?) to the output of the counters (bO - b?)• When the two values are equal, a pulse (A=B in Figure 3-7) resets the flip-flop and tums off the counters. Circuit layout diagrams and connector pin designations for all of the circuits in this section can be found in Appendix C. 37

3.3 The Laser and Shutter Subsvstems

The laser and shutter subsystems are key elements in the laser plotter. The laser supplies the light necessary to expose the film. The use of laser light simplifies the design of the beam forming optics and shutter, since this light is already concentrated in a narrow beam. An acousto-optic shutter, controlled by the microcomputer, is used to gate the laser beam through the system so that the exposure light at each point on the film can be precisely controlled.

'3.3.1 Laser The laser is a Spectra-Physics 124B Helium-Neon unit driven by a Model 255 power supply. The laser is rated at 15 milliwatts of output power at 632.8 nanometers, but was generating only about half of that, 7.35 milliwatts during this research. Laser power requirements are further discussed in Section 3.^- The laser can be remotely controlled and is equipped with a manual shutter, although these features were not exploited during the development of this system.

3.3.2 A/0 Shutter 38

The laser beam, upon exiting the laser, immediately encounters the acousto-optic (A/C) modulator. The Model 305 modulator, manufactured by Coherent Associates, consists of a glass cell 2.5 inches long. An ultrasonic wave is launched into the glass by an array of transducers bonded to the side of the cell. The ultrasonic vibrations produce what is, in effect, a diffraction grating across the cell.

When the laser beam enters the glass cell at the proper angle light will be diffracted into different components. The zero order, first and higher order diffracted components exit the modulator at angles of zero, +/-7.^ mrad, +/-1^-8 mrad, etc, respectively compared to the entering beam. Since the different diffracted components leave the modulator at different angles, it is possible to select one of these component laser beams for use in the laser plotter. A metal plate containing a circular aperture is placed in the path of the diffracted beams. The aperture is positioned so that the first order beam is passed while all other beams are blocked. A second aperture is used at the entrance to the beam forming optics to further reduce light which may be scatted into the light path. The amount of light diffracted into each 39

component depends on the amplitude of the acoustic wave propagating through the glass cell. This acoustic wave is generated by the transducers bonded to the cell which are, in turn, excited by the A/ shutter driver.

3.3.3 The A/O Shutter Driver The A/O shutter driver generates a 40 WDiz electrical signal which can be gated on and off either manually or by the cômputer. When the ^O MHz signal is applied to the transducers on the glass cell of the modulator, light is diffracted from the zero order beam into higher order beams. The first order beam is allowed to pass .through the rest of the laser plotter, and ultimately, onto the film plane of the camera. In actuality the A/C shutter can never be completely "closed", since light from the zero order beam is scattered over an area which includes the first order beam. Some of this scattered light makes iiB way through the two shutter apertures and onto the film. A neutral density filter is used to attenuate the stray light. As seen in Figure 3"8, the A/O shutter driver circuit is simply a medium power crystal oscillator (Intemational Crystal Model XHI) consisting of a transistor, a tuned circuit and associated components. i^O

Q +20.5 V

POscillato r

lOK

Modulator 40MHz > 3. 3 Cell XTAL I V V I 68K +5 V V Shutter Test Switch 2N3904 t^ CD4001B

Figure 3-P. A/C Shutter Driver Circuit. 41

The modulator cell presents a 50 ohm load to the oscillator. A logical one (5 volts) is applied to the noninverting buffer consisting of two of the four gates comprising the CD4001B Quad NCR IC. This buffered input enables the oscillator by driving the 2N3904 switching transistor into saturation thus completing the circuit and applying power to the oscillator. The waveform produced by the circuit is shown in Figure 3-9. Here the upper curve is the (TTL) cpntrol signal generated by the computer interface and the lower curve is the signal output to the modulator cell. As seen in Figure 3-9I there is a delay of approximately 1.8 ms after the oscillator is enabled before oscillation begins. This tum-on delay is compensated for in the shutter timer control circuit discussed in Section 3-2. The period of oscillation, during which the first order beam is allowed to propagate through the system, may be varied from zero to several milliseconds depending on the amount of light needed to produce the desired exposure in the film plane. The measured power in the first order beam from the modulator was 1.2 mW which corresponds to a diffraction efficiency of 16.3%- Since the output power of the laser exceeds the requirements of the laser 42

Figure 3-9- A/O Shutter driving signals. ^3 plotter by several orders of magnitude, the relatively low efficiency of the shutter driver does not degrade the performance of the system. The A/O shutter driver requires voltage sources of 5 volts and 20.5 volts. These voltages are derived from a single 30 volt power supply using two voltage regulator integrated circuits. The power supply and regulators are mounted in the X axis mirror driver cabinet. The voltages are accessable from the back panel of the cabinet. 44

3.4 Beam Forming Optics If we are going to be plotting a large number of points on a frame of 35mm film (approximately 1.7 cm square") , the size of each point image, or pixel, must be very small. Some means of tightly focusing the laser beam is therefore required. It is also advantageous to be able to control the shape of the pixels, since different plotting modes require different pixel shapes. Focusing and shaping the laser beam are two functions of the beam forming optics. It was mentioned in the last section that some scattered light from the zero order beam inevitably makes its way through the light path and onto the film plane. The beam forming optics perform a third function by attenuating this stray light to acceptable levels. Two different configurations of beam forming optics are used in the laser plotting system. These are shown in Figure 3-10. The configuration of Figure 3-10(a) is used in the general plotting and one-dimensional plotting modes and the LSFELL alphanumeric plotting routine. This set up shapes the laser beam image (pixel) on the film into a circular dot of approximately uniform illumination. The configuration of Fig-ure 3-10(b) produces a rectangular pixel which is used to plot holograms. In both cases ^5

Neutral Density Filter Pl Scanning Ll Mirrors

^

l^ fl ^ (a)

Neutral Density Filter Pl P2 Scanning Ll L2 Mirrors

í^ •^

t^fi^ \^ f2 ^

(b)

Fifture 3-10. Diagram of oeam forming optics for (a) General and 1-D plotting, and (::) CGH plotting. 46

pixel size is determined by the size of an aperture, Pl, which is focused onto the film.

3.4.1 General and Cne-Dimensional Plotting The equipment set up (Figure 3-10(a)) used in the general and one-dimensional plotting modes (with the XYPL0T/XYPLT2 and 1DPL0T/1DPLT2 operating systems) produces a circular pixel. This is formed by expanding (collimating) the laser beam and passing it through a circular aperture, Pl, of radius w, and then focusing the resulting beam to a point with a single lens, Ll. The diameter, d, of the focus spot, or waist, is "determined by the following equation,

d = 2fV'TT w, where f is the focal length of the imaging lens, and A is the wavelength of the light (632.8 nm).(4) Thus by using different size apertures, we can form pixels of different diameters, without having to refocus the optics. Table 3-4 shows the required pixel diameters and the corresponding aperture radii for a 25 cm focal length lens, Ll. The maximum exposure times (see Section 3'I) for each aperture are also listed. The actual pixels i^?

Figure 3-11• Fhotograph of circular pixels. 48 produced with this configuration can bee seen in Figure 3-11.

Table 3.4 Set up data for General and 1-D Plotting Resolution d (ji/m) w (mm) Max Exposure (ms)

64x64 266 .38 7 128x128 133 .75 5 256x256 66.4 1.5 5 512x512 33.2 3.0 6 1024x1024 16.6 6.0 5

The circular apertures are printed on single frames of 35mm Kodalith film which are mounted in slide holders. The aperture is carefully positioned in the light path to select an area of approximately uniform illumination within the expanded laser beam. The imaging lens is corrected to minimize spherical aberration. Because of scattering, some light is always present in the light path regardless of whether the shutter is "open" or "closed". This light is focused onto the film along with the plotting beam and is sufficient to expose the film in the few milliseconds that it is incident on the film as each point is plotted. A #5 neutral density 50 filter is placed in the light path to attenuate this stray light. Since the plotting beam is also attenuated, the exposure time at each point must be increased. Fortunately, we can achieve a 100,000:1 reduction of this stray light and still have maximum exposure times less than the seven milliseconds allowed by the microcomputer-to-interface data transfer rate. Cther sources of stray light were reduced by shielding the light path and carefully aligning the optics to minimize off-axis reflections.

3.4.2 Plotting Holograms When the plotter is configured to generate holograms (under control of the H0L0/H L02 operating system), a rectangular pixel is desired to maximize the light efficiency of the hologram. The beam forming optics which accomplish this are shown in Fig-ure 3-10(b) . The laser beam from the shutter passes through an attenuating neutral density filter, a rectangular aperture, Pl, and the Fourier transforming lens, Ll. The transform of the aperture is filtered by a small rectangular aperture (spatial lowpass filter), P2, which is placed in the back focal plane of Ll. The filter passes only the lowest frequency terms of the transform. 51

This filtered transform is imaged onto the film by a 25 cm focal length lens, L2. The resulting image closely approximates a rectangle. Table 3.5 lists the required pixel dimensions and aperture sizes for the different levels of image resolution of this system. As in Table 3.4, the maximum exposure times are also listed. Notice that the maximum resolution for a computer generated hologram is 256x256 points, rather than 1024x1024, which is the maximum for general and one-dimensional plotting. This follows from the fact that each "point" in a CGH is actually a cell composed of three rectangular pixels. Thus a 25^yi25^ CGH requires 768x256 discrete points on the film plane. The next higher resolution level, 512x512, would require 1536x512 points, which exceeds (in the X direction) the limit of 1024 imposed by the 10 bit D/A converters discussed in Section 3.2.2.

Table 3.5 Set Up Data for Computer Holographv Resolution Dimensions Max Exposure (ms) ?ixel(;im) Aperture(mm) 64x64 266x88.5 .38x1.1 7 128x128 133x44.3 .75x2.3 5 256x256 66.4x22.1 1.5x4.5 6 52

When a beam of light is reflected through the scanning mirror assembly, the beam is rotated by 45 degrees. So, if the image projected by L2 is aligned vertically, the image which exposes the film will be rotated by 45 degrees. We compensate for this effect by rotating the two apertures, Pl and P2, so that the image on the film is vertically aligned. Figure 3-12 is an enlargement of a small section of a hologram generated with the laser plotter. 53

Figure 3-12. Photograph of rectangular pixels. 5^

3.6 Scanning Mirrors

The laser beam, once it has been shaped and focused by the beam forming optics, is guided onto the film by the scanning mirrors. The scanning mirror assembly comprises two galvanometer mirrors (General Scanning Model G-3OOPD) mounted so that one mirror deflects the plotting beam horizontally while the other deflects the beam vertically. The angle of deflection of each mirror determines the location of the beam on the film plane. A rectangular coordinate system is mapped onto the film plane so that each point on the film can be specified by an X-Y coordinate pair. This is illustrated in Figure 3-I3. Each coordinate pair is decoded by the interface into two electrical signals which move the mirrors. In this way, the plotting beam can be positioned at any point in the 1024-by-1024 point film plane. The mirrors are controlled by two independent drivers (General Scanning Model CCX-101) which are in turn controlled by a 0-10 volt input signal. This signal comes from the two 10 bit D/A converters in the interface. The mirror drivers have Input Attenuator and Position Offset controls on the front panel and Gain and 55

• 1.7 cm

102 3 i\

Y Axis Film Plane 1. 7 cm

1023 X Axis 0 •

Figure 3-13. Coordinate mapping on film plane 56

Damping trimmers on the back. The Input Attenuator and Position Offset controls are used to fit the area scanned by the mirrors onto the film plane of the camera and can be easily set using the MIRALI program described in Section 3.6.4. To prevent damage to the mirror coils, one should always begin adjustments with the Input Attenuator control fully counterclockwise (maximum attenuation). The Gain and Damping trimmers determine the characteristics of the mirror driving circuitry. These are set by applying a square wave input to each driver while monitoring the Position utput signal on the front panel. One then adjusts the Gain and Damping trimmers to obtain maximum gain without overshoot or ringing. In normal operation it should not be necessary to adjust these controls once they have been set. The electrical and mechanical specifications of the mirrors and drivers are listed below in Table 3-6. (5), (6^ 51

Table 3.6 Scanning Mirror Specifications

Mirror Drivers Input Signal Range -lOv to 10 v Input Impedance 60 K ohms Cutput Coefficient .16 v/degree

Mirrors Shaft Wobble <5 arc-sec Excursion Range 0-25 degress p-p Linearity +/- .15?^ Resolution 1 arc-sec Signal Response 10 ^s 58

3.6 Software

3.6.1 Software Organization The software for the laser plotter can be divided into three broad categories, data processing software, operating systems and maintenance programs. The data processing software is used to generate input (image) data and to process this data for plotting on film. This processing may include Fourier transforming the image data as well as normalizing and fitting the data to the film curves. The second group of programs, the operating systems, are the programs that control the laser plotter during the actual plotting of the image. There are three operating systems which can be used in a total of five different modes. There is also a program which plots alphanumerics. Each operating system reads processed image data (from a data disk in the Compucolor II disk drive) and outputs suitable commands to the interface. T/Iaintenance programs are used to test and align the system (shutter, mirrors, camera, etc.) and to generate test pattems for film calibration. The programs are written in either BASIC (on the Compucolor ID or Fortran (on the VAX II/78O) . Most of the data processing software is written in Fortran for 59 the VAX 11/780 because of its speed and data handling capabilities. The operating systems and maintenance programs, with one exception, are written in BASIC. All programs needed to effectively operate the laser plotter are liéted in Appendix D.

3.6.2 Data Processing Software NORML Program NCRML is the routine that quantizes and normalizes the raw image transmittance data. Data is read (in blocks of up to 16,384 points) into an array called RAW. These transmittances are analyzed to find the upper and lower bounds (DATMAX, DATMIN) which are used to normalize the data into the range of useful film transmittances. For Panatomic-X film this range is 0.0 to 0.5. The characteristic film curve is read into an array, FILM, from a Fortran file named FILM.DAT. The normalized transmittance data is compared to this curve, point by point, to determine the relative exposure times corresponding to each transmittance. The relative exposure times are integers in the range of 0 - 63 or 0 - 255, depending on the level of quantization desired, which will be translated by the interface into real 60 exposure times. These results are stored in one or more Fortran files, PLOTn.DAT, n = 1, 2, 3, etc. Each of these files contains at most 4096 transmittance values. The small size of the PLOTn.DAT files is due to limitations on the length of arrays in the Compucolor II.

TRANS.FOR and TRANS.BAS The relative exposure data stored in the PLOTn.DAT files is transferred from the VAX II/78O to the Compucolor II under the control of two interacting programs, TRANS.FOR and TRANS.BAS. During the data transfer, the Compucolor II is used altemately as a data terminal and microcomputer. TRANS.FOR, which resides in the VAX II/78O is written in Fortran while TRANS.BAS is written in BASIC for the Compucolor II. The two programs communicate by means of Fortran READ and WRITE statements and BASIC PLOT and INPUT statements. TRANS.FOR reads the PLOTn.DAT files and then enters a wait state. At this time the terminal, under control of TRANS.F R prompts the user to transfer control to TRANS.BAS. This is accomplished by placing the Compucolor II in BASIC mode and loading TRANS.BAS from a floppy disk. This program receives data from TRANS.FOR in a handshaking arrangement. TRANS.BAS sends a 'l' , 61 via a PLOT command, to the VAX II/78O, and then enters a wait state. TRANS.FCR receives the character with an unformatted READ statement, and then responds by •transmitting a data value to the Compucolor II with an unformatted WRITE statement. When this is accomplished, TRANS.FGR again enters its wait state. TRANS.BAS receives the data value with an INPUT statement and stores it in an array, D.ARY. The process is repeated until all PLOTn.DAT files have been transferred. In TRANS.FOR each data value is written to the Compucolor II with an unformatted WRITE statement which sends the ASCÍI code of each value to the terminal. The ASCII code, as used on the Compucolor II, is listed in Table 3.7. The WAIT statement used in TRANS.BAS waits for a value in the range 128 - 255 to appear at the RS-232C input port. It is this value that is read by the INPUT statement. Since all of the ASCII codes are less' than 128, we need to add 128 to each code before sending it to the Compucolor II, and then subtract 128 from the value received by the INPUT statement. Notice from Table 3.7 that the first 32 ASCII ccdes are control characters. These affect the operation of the terminal and must be avoided. Therefore we also add 32 to each value before it is transmitted and subtract 32 when it is 62 received. So to transfer a number we first add 160 (32+128) to the value. The new number is transmitted to the Compucolor II. We then subtract I60 from the received value to obtain the original number that was stored in the PLOTn.DAT files. For example, to transfer the number 5 we would write I65 to the Compucolor II, which would read this value and then subtract 160 to get the original number, 5« Table 3.7 ASCII Character Set

000 NULL 032 SPACE 064 @ •096 1

001 AUTC 033 • 065 A 097 a 002 PLOT 034 M 066 B 098 b

003 CURSORXY 035 # 067 C 099 c

004 NOT USED 036 $ 068 D 100 d

005 NOT USED 037 % 069 E 101 e

006 CCI 038 & 070 F 102 f-

007 NCT USED 039 1 071 G 103 ê

008 HCME 040 ( 072 H 104 h

• 009 TAB 041 ) 073 I 105 1 010 LFEED 042 * 074 J 106 j 011 ERASE L 043 + 075 K 107 k

012 ERASE P 044 » 076 L 108 1

013 RETURN 045 - 077 M 109 m

014 A7 ON 046 • 078 N 110 n

015 A7 CFF 047 / 079 0 111 0 016 BLACK 048 0 080 P 112 P 017 RED 049 1 081 Q 113 q 018 GREEN 050 2 082 R 114 r 019 YELLOW 051 3 083 S 115 s 020 BLUE 052 4 084 T 116 t 021 MAGENTA 053 5 085 U 117 u 64

022 CYAN 054 6 086 V 118 v 023 WHITE 055 7 087 W 119 w 024 XMIT 056 8 088 X 120 x 025 CURSOR R 057 9 089 Y 121 y 026 CURSOR L 058 : O9O Z 122 z 027 ESC 059 ; 091 [ 123 028 CURSCR UP O6O < 092 / 124 029 FG ON 061 = 093 ] 125 030 BG ON 062 > 094 A 126 031 ELINK CN 063 ? 095 _ 127 DEL

Avoiding the first 32 ASCII codes leaves only 96 available data values. This presents no problem if the transmittances of the image are quantized to 64 gray levels. If, however, we want to quantize the image to 256 gray levels, we must send two ASCII codes for each point in the image. This is accomplished by decomposing each data value into two codes, N and M, so that l6xN+M is the desired value. For example, if we want to send the value 157f we would transmit two numbers 9 and I3 since 16x9+13=157. Notice that twice as many data transfers, and hence, twice as much time, are required to transfer an image quantized to 256 gray levels. 65

FILE AND F LL Both NORML and TRANS.FCR make extensive use of the VAX's file control system (FCS). FILE and FILL are two example programs which illustrate the use of this system, FILE generates a block of 4096 data points and stores them in a Fortran file, TEST.DAT. FILL retrieves this file and displays a portion of it on the terminal for verification.

HARM HARM is a popular three-dimensional Fast Fourier Transform (FFT) program, based on the Cooley-Tukey algorithm.(7) f (8) HARM is usually accessed as a Fortran subroutine from a master program. For transforming two-dimensional functions, such as the images we are concemed with, HARM acts as though the first and third, and second and fourth quadrants of the image were reversed. Therefore it is necessary to switch these quadrants before and after calling HARM. The image to be transformed (assumed to be complex) is stored in a complex NlxN2 array, A, which is transferred to HARM in a real vector, T, of length 2(N1)(N2), in the format outlined in Table 3.8,below. 66

Table 3.8 Format for Input to HARM Image Array Harm Vector

Re A(0,0) T(l) Im A(0,0) T(2) Re A(.1,0) T(3) Im A(1,0) T(4)

• • Re A(X,Y) T(2YN1+2X+1) Im A(X,Y) T(2Ynl+2X+2)

The results of the Fourier transformation are stored in T for transfer back to the calling (master) program. This vector is then rearranged into a proper two dimensional array.

CGHl CGHl is a master program which retrieves an image from a Fortran file for transformation to a computer generated hologram. First the image is quadrant reversed and placed in a vector, T, as discussed in the last section. The program then calls Subroutine HARI/I which performs the FFT. The results are put back in the vector T. This data is then read into a two-dimensional 67 a.TTQ^}f and the quadrants are again reversed. CGHl then converts this complex array into three real arrays which form the basis for the Lee-Burckhardt holograms discussed in Appendix A. NCRML is then called, as a subroutine, to normalize the new data and fit it to the film curve so that the hologram may be plotted. The results are then stored in the PLOTn.DAT files for transfer to the Compucolor II.

LABEL LABEL is a BASIC program which generates the position data necessary to plot an alphanumeric label. The actual plotting is done under the control of LSPELL, which is discussed in the next section. The user enters the label (up to 16 characters) when prompted by LABEL, terminating the string with a dollar sign ($). The program then compares each character in the string against a table (Table 3.9'» of available characters stored in memory. This table is stored in an array, A.ARY on the System Disk #2. The label is converted into position data which is stored in an array, LABEL.ARY on the data disk. 68

Table 3.9 Characters Available for LSPELL Routine 0 P

1 Q 2 R 3 S 4 T 5 U 6 V 7 W 8 X 9 Y A Z B C D @ (Prints double T) E # F / G H I : J + K • L M N 0 69

3.6.3 Operating Systems Interactive control of the laser plotter is facilitated through use of the three operating systems. Since these programs are similar, differing only in the format and use of certain program elements, we will discuss the elements common to all three systems before examining each in detail. As mentioned in Section 3.2, the backbone of the operating systems is the BASIC OUTPUT statement, CUT I,J, where I is the address of an output port, and J is the value to be sent to the port specified by I. Both I and J are integers in the range 0-255. Table 3.10 lists the addresses of the five output ports used in the laser plotter. Ports 239, 247 and 253 are used in the normal Random Access Mode; all five ports are used in the extended Random Access Mode; and only ports 247 and 253 are used in Sequential Access Mode. Notice that port 253 serves different functions depending on which operating mode is in use. 70

Table 3.10 Output Port Designations Address Binary Equivalent Function (Destination) 239 11101111 X position (upper bits) 247 11110111 Shutter control 251 11111011 Y position (upper bits) 253 11111101 Y position (lower bits^ and reset in Seq. mode 254 11111110 X position (lower bits)

The typical output sequence for operating systems plotting in the two Random Access Modes is as follows: X coordinate, Y coordinate, exposure time. Recall that the exposure time here is relative, not absolute. This sequence is repeated for each point to be plotted. For a normal RAM plot, three OUT instructions are required for each point. In the extended RAM, five instructions are needed for each point. Table 3.11 illustrates the EASIC output sequence for both plotting modes. 71

Table 3.11 BAS G Output Sequence for RAM Plotting Normal RAM Extended RAM

CUT 239f(lst X value) OUT- 239, (Ist X value, high) OUT 253,(Ist Y value^ CUT 254,(Ist X value, low) OUT 247,(Ist exposure^ OUT 251,(Ist Y value, high) OUT 253.(Ist Y value, low) OUT 2 39,(2nd X value) OUT 247,(Ist exposure) OUT 253f(2nd Y value) OUT 247,(2nd exposure) OUT 239,(2nd X value, high) CUT 254,(2nd X value, low) CUT 251,(2nd Y value, low) CUT 253.(2nd Y value, low) OUT 247,(2nd exposure)

In the Sequential Access Mode (SAM) only exposure values are output to the interface. X and Y position values are generated by the interface itself. This is from three to five times faster than the Random Access Modes because only one output statement is required for each plotted point. In the operating systems to be discussed below, HOLO/HOLO2 is a purely SAM system, and 1DPL0T/1DPLT2 is a purely RAM system. The XYPL0T/XYPLT2 system gives 72

the user the option of RAM or SAM plotting. The LSPELL routine, although not an operating system per se, is included in this section and is a RAM plotting system. Each operating system is divided into two interactive subprograms. The first subprogram contains information to acquaint the user with the data formats and other parameters peculiar to that operating system. The second subprogram does the actual plotting. In each case, the second subprogram can be called either by the first, or directly, if the user is already familiar with how it is used.

All of the operating systems are on the Operating System Disk (OPERSYSl). These programs can be loaded into the Compucolor II in two ways. First, the BASIC calling sequence can be employed (e.g. LOAD "XYPLT2"). This will load any program on the disk and is the fastest way of gaining access to an operating system. Altematively, the user can press the "AUTO", or autoload, button on the keyboard. This will load a "menu" program from the disk which identifies the system to the user and lists the programs stored on the disk. The user can then select, by number, the correct operating system or program for his particular application. It is extremely important that the user read and follow the disk handling 73 instructions printed on each disk and on the Compucolor II to avoid damaging or destroying the programs stored on these disks.

XYPL0T/XYPLT2 XYPL0T/XYPLT2 is the general plotting operating system. Both random access and sequential access modes are available to the user. XYPLOT is the instructional subprogram of this system. Here, data formatting options (RAM vs SAM) are described and coordinate axes and relations are defined. Also parameters such as image size and number of gray levels desired are determined, interactively, with the user and checked by the program to make sure they are within the limits of the system. This helps avoid mistakes by first time users who are unsure of exactly how to operate the laser plotter. When the user is sure of how to proceed, XYPLOT will call XYPLT2 and the user can begin plotting. XYPLT2 is the actual plotting subprogram and can be called directly by the experienced user. This program will ask the user to supply certain information needed to make the plot. This information includes the desired plotting mode (RAM or SAMl and the size and gray level resolution of the image to be plotted. A maximum of 74

1024-by-1024 points can be plotted with up to 256 gray levels at each point. For SAM plotting, exposure data is stored on the data disk sequentially by columns, starting with the point (0,0). For RAM plotting, both position and exposure data is stored on the disk. Sets of values defining data points can be stored in any order, as long as each point is listed as X position, Y position, exposure value, in that order.

Data is stored on the disks in files labeled DATAn.ARY, n = 1, 2, etc. Each file contains a maximum of 4096 points. For large images, the number of data points may exceed the limits of a single disk side (51.2 Kbytes) and more than one disk (or disk side) may be used. A pre-exposure check list is provided which is intended to prevent the user from beginning a plot until everything is in order. This serves a dual purpose since the check list not only eliminates mistakes (when used conscientiouslyl, but also acts as a "buffer" to prevent accidentally starting the plotting sequence. (The "RETURN" key must be pressed several times in order to step through the list rather than just once to begin a plot.'^ When the check list has been successfully completed a five second countdown sequence begins which 75 allows the user ample time to open the camera shutter before the first points are plotted. Normally, the Compucolor's screen is kept blank during the plotting sequence to reduce the amount of ambient light in the system, but as each column of the plot is completed, the column number is flashed onto the upper left comer of the screen so that the user is kept aware of the progress of the plot. A filter made of two pieces of unexposed Panatomic-X film is placed over this area of the screen to reduce the intensity of the prompting message.

H0L0/H0L02 The H0L0/H0L02 operating system is designed to plot Lee-Burckhardt computer-generated holograms (see Appendix A^. Here, we plot three pixels along the X (horizontal) axis for each point on the Y (vertical) axis. The largest hologram that can be plotted with this program is 256x256 cells, that is, 768x256 pixels. Each pixel is a rectangle approximately three times as high as it is wide so that a plotted hologram point (three pixels) is a square. This is illustrated in Figure 3-14. The operating system produces transmittances with a contrast resolution of 256 gray levels. 76

A + B + C = one CGH cell. A / \ T

Pixel Pixel Pixel A B C

/3- -1/3 1/3—H

Figure 3-14. Pixel arrangement for CGH plotting. 77

HOLO is an interactive subprogram that teaches the novice how to use the system to plot holograms. The representation of complex images with real pixels, and data formats are also explained. The size and resolution of the hologram to be plotted are determined interactively by the user and checked by HOLO for compatibility with the system. When the user feels that he has sufficient knowledge of the system, H0L02 will be called to begin the actual plotting. H0L02 is the functional half of this operating system and controls the laser plotter while plotting a computer generated hologram. H0L02 will ask the user to input the size and gray level resolution of the hologram to be plotted. From this point, the operation of H0L02 is exactly the same as XYPLT2 discussed above. Since any CGH will most likely be created on the VAX II/78O computer and stored in sequential form, the RAM capabilities of XYPLT2 are neither necessary nor desirable in H0LC2. Data is stored in the same manner as for SAM plotting in XYPLT2.

1DPLQT/1DPLT2 1DPL0T/1DPLT2 is used to plot one-dimensional functions, masks, etc. These plots may contain up to 78

1024 columns of from one to 1024 identical pixels. Since the transmittance of each point in a column is the same, only one exposure value need be read from the data disk for each column. Thus, an entire one-dimensional plot can be completely specified with a maximum of 1024 data points. As in the previous two operating systems, IDPLOT explains the use and data format of the system while 1DPLT2 does the actual plotting. The user will be asked to specify the number of columns and column length for the plot. Regardless of the number of points in each column, it is desirable that the plot be centered on the film frame. In order to accomplish this, RAM plotting is used. Another reason for using RAM plotting here is to allow for plotting a label with the LSPELL routine, which also uses the Random Access Mode.

LSPELL While not actually an operating system, LSPELL is used with these systems to label plots as they are made. LSPELL uses the same RAM plotting elements as XYPLT2 to plot a label of up to 16 characters. Fifty different alphanumeric characters and symbols, including the Texas Tech "Double T", are available with LSPELL. These 79 characters are listed in Table 3.9. Each character is plotted by exposing certain dots in a 5yi7 dot matrix cell. The 5x7 dot matrix format is common in computer printers. The characters are plotted in Random Access Mode with a resolution of 128x128 points in the film plane. As many as 16 characters can be plotted on any one line. Placing 16 characters on each line (each character five points wide"^ allows three points per character for spacing. A label 16 characters long will occupy an area of 128x7 points at this level of resolution (1024x56 points in the 1024x1024 point film plane) and the label may be placed anywhere in the film plane. The user should be careful to leave room for the label in the film plane. The label is constructed using LABEL.

3.6.4 Maintenance Software A number of maintenance programs have been developed to facilitate alignment and calibration of the laser plotter. These programs, described below, are stored on System Disk #2 and can be loaded directly with the LOAD command or from a "menu" by pressing the "AUTO", or autoload, key on the keyboard. Users should read and observe the handling precautions printed on this disk to avoid damaging or destroying these programs. Listings 80 of the maintenance programs are found in Appendix D.

M RALI MIRALI is a RAM program used to align the scanning mirrors and to match the size of the plotting plane of the mirrors to the film plane of the camera. MIRALI pulses the laser beam at each comer of the coordinate plane in succession. The results are four dots at the corners of a rectangle which defines the plotting plane of the system. (The neutral density filter must be removed from the light path or the dots will not be visible.) By adjusting the INPUT ATTENUATCR and POSITION CFFSET controls on the mirror drivers, the size, shape and position of this rectangle can be changed. A screen has been placed in the back of the camera in the film plane on which is drawn a 1.7cm x 1.7cm square which defines the proper film plane. In each comer of this square is a much smaller square which marks the correct location of the dots generated by MIRALI. When the four dots are centered in the four small squares in the corners of the film plane, the mirrors are properly aligned. Cnce this program has been started, it will run until the BREAK key (down arrow) is pressed on the keyboard. 81

SHTEST

SHTEST simply pulses the laser beam on and off. One uses this program to align the mirrors, benches, etc. in the optical path. ( ne should be careful not to look into the beam or a specular reflection of the beam.) The width of each pulse is the maximum width corresponding to an OUT 247,255 command, so this program can be used (with an oscilliscope) to set the timing potentiometer in the shutter timing control circuit.' Like MIRALI, this program, once started, can only be halted by pressing the BREAK key (down arrow) on the keyboard.

CALBR8 CALBR8, another RAM program, is a film calibration routine. This program plots an array of I6xl6 dots at maximum exposure (corresponding to an CUT 247,255 command) on a frame of film. CALBR8 serves two functions. First, the program is useful for finding the minimum shutter control pulse width which will result in a maximum density in the developed film. This is necessary if a new film, or development procedure is being used or if any of the optical elements inthe light path are changed. Secondly, CALBR8 can be used to find the exact focal length of the imaging lens. In either case. 82 calibration is accomplished by exposing a series of film frames while varying the unknown parameter (pulse width or focal distance). The correct pulse width or distance is found by examining the developed results.

FSET FSET is a Fortran program which allows the user to enter the characteristic curve of any film into the VAX 11/780. NORML uses this curve to "fit" the transmittances of an image to the film to account for film nonlinearities. The exposure axis of the film curve is quantized by the user into 64 or 256 values which are numbered 0 to 63» or 0 to 255. (See Figure 3-I) Once this is done, the transmittances at each exposure value are entered into the computer with FSET. FSET will prompt the user with the relative exposure number and the user replies with the appropriate transmittance. FSET is stored in a Fortran file , not on a system disk. Chapter Four Applications of the Laser Plotter

4.1 General Output Device With the laser plotter, any nonnegative, real, two dimensional function can be represented on film for use as a processing mask. This representation may not be exact since a function (or image) must be sampled, normalized, and quantized before it can be plotted. This is not a serious limitation, however, because in many instances we are dealing with images created in the computer where the digitization process samples, normalizes and quantizes the image as it is created. As a general output device, the laser plotter is perhaps most useful for plotting high resolution amplitude masks which are needed in optical processing. For instance, pseudorandom binary "checkerboard" diffusing masks which are used in multiplex holography to encode the individual holograms for reconstruction can easily be generated with the laser plotter. The Random Access Mode is particularly well suited for this type of plot. Often, the dynamic range of the output of an optical processor (which we wish to record on film for use in a second optical processor), may be greater

83 84 than the dynamic range of the film we wish to use. Here the laser plotter can be employed to generate a filter which compresses the range of the function so that it can be recorded. Since the plotted functions are generated in the computer, many types of spatial filters and optical transforming elements can be created which cannot be produced optically. The laser plotter can also plot conventional "photographic" images, similar to halftone images, for use as inputs to an optical processor. In a typical application, a simple image, say the "wheel" used in the next chapter (see Figure 5-3) is- placed in the input plane of an optical processor. The image might be Fourier transformed or used to make a matched filter for a character recognition experiment. Optical processing applications aside, the laser plotter is a versatile computer peripheral in its own right, operating in much the same capacity as an X-Y (pen and ink^ plotter. With LSPELL, the alphanumeric plotting routine, experimental data can be reliably labeled as it is generated. Two-dimensional data or experimental results can be plotted wiiih the system for presentation with an ordinary 35nmi slide projector. This eliminates the extra step of making photographic slides 85

from hand or computer-drawn graphs.

4.2 Computer Generated Holographv The primary use of this laser plotter will be the production of computer generated holograms. With the HARM FFT program and the H L0/HCL02 operating system, a self contained CGH production facility has been realized. The data processing capability of the VAX 11/780 computer makes the system especially valuable for the generation of multiplexed CGH's (9) and other processes which require multiple Fourier (or other) transforms to be performed. Using the same method of phase generation by delayed sampling that is employed in Lee-Eurckhardt holography, the laser plotter can create optical transparencies which can perform a variety of complex-valued transforms, such as Hilbert and Mellin transforms. For a discussion of the generation of generalized optical transforms, the reader is referred to Reference (10).

4.3 Phase Masks In the future, the laser plotter will generate phase masks directly without resorting to delayed sampling techniques. A successful technique for generating phase 86 masks uses photoresist, rather than film as the recording medium. Photoresist is a photosensitive material which is commonly used in the fabrication of integrated circuits, as well as in optical processing. Unlike conventional film, photoresist is sensitive to ultraviolet (UV), rather than visible, light. The exposed photoresist plate is developed in an etching solution which dissolves those areas of the photoresist which have been exposed.

(ll^ The production of this type of phase mask might pro.ceed as f ollows: First, the phase function to be plotted is- generated and "fitted" to the known phase- exposure characteristics of the photoresist (in much the same way as the real transmittance of an image is "fitted" to the film's characteristic curve in the present system). The exposure is then made with the laser plotter (using a UV light source) and the plate is developed. The resulting relief pattem is a mapping of the phase function.

4.4 Plotting Color Images Because of the repeatability of the plotting prccess, the laser plotter could be used to plot color images. This could be done using a pixel format similar to that 87 of a color TV. Each pixel would contain three dots side by side, one red, one blue and one green. (This is essentially the same format as we use in CGH plotting.) The different colors would be supplied by three lasers (or a collimated white light source and filters). The image would be made by plotting three monochromatic images , displaced by one dot width, each with a different color light. This technique may also have applications in color holography.

4.6 The Laser Plotter as a Scanner Although the laser plotter has been described as an output device, this need not always be the case. Figure 4-1 shows the plotter reconfigured as an input device, a computer-controlled scanning detector.(12) The direction of the light path is reversed so that the mirrors now scan an input plane. The microcomputer determines which point on the input plane is accessed by the scanning mirrors. Light from this point is focused onto a photodetector. The output of the photodetector is converted to its binary equivalent by an analog-to- digital (A/D) converter. The microcomputer reads the output of the converter and stores this value on a disk. 88

o o -p

cuO C •H

OJ

0) x: -p

•H CQ

I

(U

•H 89

A scanner of this type could have many uses as a detector, or recorder, of the output plane of an optical processor. Cne application that has been suggested would use only one of the two scanning mirrors, say the Y axis mirror, to scan a two dimensional light distribution onto a one dimensional Reticon photodiode array. In this way, for example, a 256 pixel by 256 pixel image plane could be read by a single 256 element diode array.

If the input plane to the scanner is the output plane of a Fourier (or Mellin, or Hilbert, etc.) transforming processor, the transform could be read into the.microcomputer point by point. In this way, the microcomputer-scanner combination can perform transformations that would normally be done on a larger mini- or main frame computer. The scanning detector in Figure 4-1 could also be used to scan an optical transparency by rearranging the system as showh in Fig'are 4-2. Here, a single point on a transparency is illuminated by the laser beam. The position of the laser beam on the transparency is determined by the positions of the scanning mirrors. An integrating lens collects the light from the transparency and focuses it ontb the photodetector, the output of which is sent, via the A/D converter, to the microcomputer. 90

>: O G 0 U cti co ci

cd —^ ctí o CQ

O r-\

;M

QJ:

•H CQ :3

C\J

I

D^ cn c u æ •H o c u c >-i & «So •Hs • H cn 91

With the capabilities suggested by Figures 4-1 and 4-2, it may be possible to use the laser plotter to scan and record the output plane of an optical processor, generate a transparency from that recorded information, and then check the generated function by scanning it point-by- point as in this last example. Chapter Five Results and Examples

5.1 Alphanumerics The laser plotter, under control of LSPELL, is able to plot 50 different alphanumeric characters and symbols, including the Texas Tech "Double T". These characters are listed in Table 3.9. The label (up to 16 characters long) is constructed using LABEL. Figure 5-1 is a photographic print of a transparency containing all 50 characters. This particular plot was made using an extended version of LABEL which allowed a label of 5O1 rather than 16, characters to be constructed.

5.2 Grav Scale The laser plotter can plot up to 256 different values of transmittance. These values are usually represented as different levels on a gray scale, expressed in terms of density, rather than transmittance. Figure 5-2 is a print of a transparency which contains a gray scale plotted with the 1DPL0T/1DPLT2 operating system at the maximum resolution of 1024x1024 points. The density of the scale is graduated, in steps of 0.2 from 0.3 (the base density of the film) to 1.1

92 Fi.; -ure 5-1- Demonstration of alphanumeric capaoility.

Fi-"'ure 5-2. A gray scale made with the laser plotter. 94

5.3 Plotting Images As a simple demonstration of the laser plotter's ability to plot images, a "wheel" image was generated and plotted on film. A photographic print made from this film is shown in Figure 5-3. This image was plotted in Sequential Access Mode at a resoiution of 256x256 points, using the XYPL0T/XYPLT2 operating system.

5.4 Computer Generated Holograms A computer generated hologram of a "Double-T" symbol was created using the CGHl prpgram discussed in ' Section 3.6. This CGH was plotted at a resolution of 384x128 points (128x128 pixels). A print of the CGH is shown in Fignre 5-4(a^. The hologram was played back and the reconstruction recorded. The reconstructed image is presented in Figure 5-4(b). 95

Figure 5-3. ^Wheel' Image plotted in General Plotting ívlode. 96

cd - s EH •H

(U X5 iH nJ -r-i J-i c: o o c (D 73 CJ cu 1 -u; U -P

(D

CTÎ cí: • H Chapter Six Future Expansion and Conclusions

The laser plotter was built largely using available equipment, so the design of the system has not been optimized for either speed or image resolution. The system was," however, designed to be easily expandable to meet future needs. This chapter discusses the expansion of the laser plotter, and attempts to address the fundamental, or absolute, limits of that potential expansion.

6.1 Expanding the Laser Plotter The laser plotter is limited in basically two ways: speed and image resolution. These parameters are related, since increasing the resolution of a plotted image (that is, the number of points in the film plane) increases the overall time required to complete the plot. On the other hand, increasing the speed of the system (that is, decreasing the time required to plot each point) enables us to plot larger images in a given amount of time. The speed of the laser plotter basically depends on two factors, the speed of the microcomputer and the

97 98 time needed to expose a pixel on the film. From this statement we see that we can increase the speed of the system in two ways: we can either use a faster output program or a faster microcomputer. The Compucolor II outputs data at approximately 143 bytes/second (just under 1200 baud) with the BASIC output statement. Since the maximum speed (in terminal mode) at which the microcomputer can send data is 96OO baud (1200 bytes/ second), it may be possible to obtain higher data rates with a machine language program. Secondly, we can increase the diffraction efficiency of the shutter by using a shutter driver with more output power. Units are available commercially which will drive the modulator cell with efficiencies of up to 85^. Increasing the diffraction efficiency would decrease the relative strength of the scattered light from the zero order diffracted beam, thus allowing shorter exposures. Altematively, we can use a faster film. The system presently uses Panatomic-X film (ASA 32) which was chosen for its excellent linearity and resolving power, not its high speed. (See Appendix B.) Faster films such Plus-X Pan film (ASA 125) are available with good linearity, but these have less resolving power than Panatomic-X.(3) 99

The resolution of the system is determined by two component parameters. These parameters are the size of the pixel, which is determined by the beam forming optics, and the resolution of the D/A converters. The small size of the pixel is inversely proportional to the size of the beam used to produce it. Thus, expanding the number of points in the film. plane requires either increasing the diameter of the beam or increasing the size of the film plane. The resolution of the D/A converters is fixed at ten bits, but twelve and fourteen bit D/A converters are available.

6.2 Limits of Expandabilitv A system as complex as the laser plotter has several limiting factors which need to be considered when expanding or upgrading the system. The situation is further complicated by the fact that these factors are all interrelated. Ferhaps the best way of illustrating these limitations is by example. To this end, four different expansion scenarios are discussed in the following paragraphs.

Example Cne The fastest data rate available in the present 100 system is 19,200 baud. This is the upper limit of the VAX's terminal (RS-232C) communication capabilities. Assuraing we had a microcomputer that could match this speed, we could output 2400 bytes/second to the interface. This is 16.8 times as fast as the present data rate. So we could plot 16.8 (call it 16 for convenience) times as many points, in a given time interval, as we can in the present system. Plotting 16 times as many points requires adding four bits of resolution to the D/A converters. So we need 14 bit D/A'S. NOW, assuming we can plot 2400 points/second, how long would it take to generate an entire image of this size (16384 by 16384 points^? The answer is 31 hours. Therefore, in this example we are limited by the required plotting time before we are limited by resolution.

Example Two The maximum time required for any plot with the present system is about two hours. If we could plot at the speed we used in Example Cne, what is the largest image that we can plot, within this two hour interval? Plotting at the rate of 2400 points/second we can plot an image of just under 4157 by 4157 points, or taking the nearest power of two, 4096 by 4096 points. This 101 requires 12 bit D/A converters. So for reasonable plotting times we are limited to an image just four times larger than our present capability.

Example Three We must also consider limits on the laser plotter imposed by the scanning mirrors. With the present optical system, the mean distance between the mirrors and the film plane is about 10 cm. In order to cover a 1.7 cm square film plane, the mirrors must be moved through an angle of about 9.7 degrees. Given this angle and the resolution of the mirrors, what is the maximum number of discrete locations available in either dimensions of the film plane? We recall from Section 3.5 that the resolution of the mirrors is 1 arc-sec. So, there are almost 35»000 points in each dimension of the film plane in which we can plot discrete points. Plotting a 32768 by 32768 point image would require I5 bit D/A converters, and a data rate of almost 150,000 bytes/second. This data rate could never be achieved, since the mirrors have a finite signal response time, which is 10 us. This places an upper bound on the data rate of 100,000 bytes/second, which is still beyond the capabilities of all but the fastest computers. Thus, 102 the resolution and speed of the mirrors are elements of the system which will never have to be increased.

Example Four As a final example, consider the size of the-film plane as a limiting factor. What is the smallest pixel we can image, and how many of these pixels can we squeeze into 2.89 square centimeters of film? Because of the f inite extent of the imaging lens, the diameter of the largest beam we could bring to a focus is about 3 cm. Using the formula we mentioned in Section- 3*4, this yields a minimum beam waist of 1.7 um. We could put 100 million of these pixels in our film plane. This corresponds to an image size of 10,000 by 10,000 pixels. • From these considerations it appears that the most important limitation on expansion of the laser plotter is the .speed of the microcomputer. All other components can be easily expanded beyond this limit. A reasonable expansion of the system would be to increase the image resolution by one or two bits, with a corresponding increase in the data rate of the microcomputer.

6.3 Concluding Remarks This thesis has attempted to describe the design 103 and operation of the laser plotter and is intended to be used as an operating manual. Each component has been discussed in sufficient detail to allow for a thorough understanding of the operating principles of the system. Examples of the capabilities of the laser plotter, including the production of computer-generated holograms, have been presented and areas of future applications have been suggested. The means of expanding the laser plotter have also been explained, and the fundamental limits of expansion have been defined. More information on the various components which make up the laser plotting system is available in the appendices and in the references. REFERENCES

(l^ J.W. Goodman, "Introduction to Fourier Optics", McGraw-Hill. 154-155 (I968). (2) J.R. Leger, J. Cederquist and S.H. Lee, "A Microcomputer-Based Hybrid Processor at UCSD", Submitted to Optical Engineering. June, I98I. (3) "Kodak Professional Elack-and-White Films", Kodak Publication No. F-5, Second Edition, DS-10 (I976). (4") A.E. Siegman, "An Introduction to Lasers and Masers", McGraw-Hill. 316-317 (1971). (5) "Scanner Driver Amplifiers", Data Sheet, General Scanning. Inc. (6^ "G-3OOPD Optical Scanner", Data Sheet, General Scanning. Inc. {7) J.W. Cooley and J.W. Tukey, "An Algorithm for Machine Calculation of Complex Fourier Series", Math. Computation. Vol. 19, 297-301 (1965)• (8) E.O. Brigham, "The Fast Fourier Transform", Prentice Hall (1974). (9) C.A. Irby, "Computer Generated Multiplex Holography", M.S. Thesis, Texas Tech University (I98O). (10) J.R. Leger, S.H. Lee, "Coherent Implementation of Generalized Two-Dimensional Transforms", SFIE Real-Time Signal Processing, 210-218 (1978). 104 105

(11) W.D. Redus, "Two Dimensional Phase Codes for Multiplex Holography", M.S. Thesis, Texas Tech Universitv. 89-96 (I978K (12) K. Preston, Jr., "Coherent Optical Computers", McGraw-Hill. 213-215 (1972). (13"» W.H. Lee, "Sampled Fourier Transform Hologram Generated by Computer", Applied Optics. Vol. 9, 639-643 (1970). (14"» C.B. Burckhardt, "A Simplification of Lee's Method of Generating Holograms by Computer", Applied Gptics. Vol. 9, 1949 (1970). Appendix A Background on Computer-Generated Holograms

Any transparency generated by the laser plotter consists of a regular array of small dots (pixels) on photographic film. We can vary the amplitude of the transmittance of each dot, but we normally have very little control of the phase.(l) This would seem to preclude the representation of complex-valued functions. It is possible, however, to represent complex- valued functions as functions of amplitude only. This can be accomplished by applying a technique known as phase generation by delayed sampling. This technique can be implemented in many various ways. The method employed in this thesis has been proposed by Lee (13) and Burckhardt (14). Here, the magnitude and phase of the transmittance of a point in a complex-valued function are represented by the amplitudes of the transmittances of three dots in an amplitude function. Holograms plotted in this way are called computer-generated holograms.

Phase Generation by Delaved Sampling Suppose we want to generate a hologram, with a

106 107 certain transmittance H(u,v), the Fourier transform (reconstruction) of which contains the representation of a certain (real or complex) function, f(x,y). Let f(x,y) be the Fourier transform (neglecting coordinate inversion) of F(u,v). The function F'(u,v) is a sampled version of F(u,v), that is,

F'(u,v^ = j:zF(u,v)ô(u-n/w,v-m/w), (l^ nm where the sample-to-sample spacing in u-v space is l/W and the dimensions of the discrete frequency cell are l/Wx 1/W. The Fourier transform of F'(u,v) is

f'(x,y) = zzf (u-nw,v-nw). (2) nm

In x-y space the unit cell has dimensions W x W. Suppose thát the function F(u,v) is sampled at three times as many points along, say, the u axis. We will let this function be our hologram, H(u,v), so that,

3 3n-K7T H(u,v^ =1 Z E F^(u,v)6(u- 3w , v-m/w). (3) n m k=l

The Fourier transform (reconstruction) of Equation 108

(3) is

3 h(x,y) = Z Z E fj^ íc-nw,y-nw)exp(jn(k-l)7T/3, (4^ n m k=l where f^(x,y^ is the Fourier transform of F (u,vi for each value of k. Equation (4) can be rewritten as

h (x,y) = Z Z t (x-nw,y-mw) (5a) n m where tn(x,y) = Z f, (x,y)exp(jn(k-l)TT/3) (5b) k=l ^

In Equation (3), we have decomposed the complex-valued function F(u,v^ into the sum of three functions, F.(u,v), i = 1, 2, 3« These functions can be made real and nonnegative by using the rule in Equation (6). If

F(u,v^= |F(U,T^1 expCj(u,v^ ^ , then

1

|F(u,v^ |ccs<í)+ 13 |F(u,v) I sÍTíj) 0 <_ <í) < 27/3

F^(u,v) = 0, 2TT/3H> < 4Tr/3 ^^^^

2/V3 F(u,v)|sin(<í,- 4TT/3K4/3 ^^ <2^

2/^/3 I F(u,v:jsin<í>, Ojiø< 2TT/3

E^^^'V^ = JF(U,V)|COS(*-27T/3 + W5|F(uv^(4)- 2TT/3) 2 V3 1 ^ < 0,4îi$l 4> < 2TT (^^^ 109

0, 0 1 (p < 2 V3

F^(u,v) = 2//3 |F(U,V) Isin i^ - ^'^/3)^^/31^ < k-^/l (6c)

|F(U,V) I COS ('í'-^TT/^^+i/Í^ÍF^u^^lsin (*-4V3, 4^/31 ^ < 2 ^ Since the functions in Equation (6) are strictly real and nonnegative, Equation (3) can be plotted on photographic film with the laser plotter. Notice that in Equation (5) the function tl(x,y) is equal to the Fourier transform of F(u,v). Consequently, by transforming the phase information of F(u,v) in Equation (6) into position information, as in Equation (3^^ we can reconstruct the desired function f(x,y) from an amplitude transmittance function, H(u,v). Appendix B Characteristics of Panatomic-X Film

Kodak Panatomic-X film (3) is a slow speed (ASA 32), panchromatic film that yields negatives with extremely fine grain. Generally speaking, the faster a film, the larger the grain size (and, hence, the lower the resolving power). This film has a very high resolving power of 200 lines/mm at high contrast. The characteristic curve for Panatomic-X film is approximately linear over the range of densities O.3 - 2.0. The highest contrast index for this film is obtained using the following development procedure: (1) Develop for 10 minutes in D-76 developer (diluted 1:1) at 73 degrees. (2) Place in stop bath for 30 seconds. (3) Fix for 5 minutes (2 minutes if Rapid Fixer is used). (4) Rinse for 20 minutes in running water and 1 minute in Photo-Flo solution. Panatomic-X film has a base fog density of 0.3. This is the density of a piece of unexposed film. A density of .3 corresponds to a maximum transmittance of 0.5, by the following equation:

D = log(l/T),

110 111 where D is density and T is transmittance. An "ideal" film would have a base fog density of 0.0, which would correspond to a maximum transmittance of 1.0. Table B.l is a listing of the data values from the transmittance- exposure characteristic curve that were stored in FILM.DAT in the VAX II/78O. These 64 values were entered into the computer and expanded to 256 values with an interpolation routine. 112

Table B.l Characteristic Curve Data for Panatomic-X Film

Rel. Exposure Trans. Rel. Exposure Trans. 0 0.5. 32 .006 1 .24 33 .0058 2 .15 34 .0056 3 .09 35 .0054 4 .078 36 .0052 5 .065 37 .005 6 .053 38 .0048 7 .047 39 .0046 8 .042 40 .0045 9 .036 41 .0043 10 .03 42 .0041 .028 43 .0039 .026 44 .0037 13 .024 45 .0035 14 .023 46 . .0033 15 .021 47 .0031 16 .019 48 .0029 17 .017 49 .0027 18 • .015 50 .00252 19 .014 51 .00232 2,0 .0137 52 .00213 21 .013 53 .00194 22 .0124 54 .00174 23 .0118 55 .00155 24 .0111 56 .00135 25 .0105 57 .00116 26 .00986 58 .00097 27 .00921 59 • .00077 28 .00857 60 .00058 29 .00793 61 .00039 30 .00729 62 . .00019 31 .0066 63 0.00000 APPENDIX C WIRING DIAGRAMS AND LAYOUT OF CIRCUITS

Table C.l Compucolor II nterface Bus Interface Bus Interface Cable (50 pins) (40 conductors) Pin No. Designation Conductor No. 4 I/O W 13 Ground 13 20 a5 20 22 dO 22 23 aO 23 24 dl 24 25 al 25 26 d2 26 27 a2 27 28 d3 28 29 a3 29 30 d7 30 31 a4 31 32 d6 32 33 d4 33 34 d5 34 35 a6 35 37 a7 37

113 114

Table C.2 44 Pin Interface Bus Pin No. Designation 1 yO 2 aO 3 yl 4 al 5 y2 6 a2 7 y3 8 a3 9 y4 10 a4 11 )I5 12 a5 13 y6 14 a6 15 ^7 16 a7 17 xO 18 +5v. 19 xl 20 do 21 x2 22 dl 23 x3 24 d2 25 x4 26 d3 27 x5 28 d4 29 x6 33 x8 304 d57 325 dxô9 36 +15v. 37 X Pos. 38 -15v. 39 Y Pos. iío Tcnii/ /4,1 Shutter 42 y8 43 y9 Zl4 Ground 115

Table C.3 RS-2 32C Interface Pin Desisnations Compucc)lo r II RS-232C Designation Pin No. Pin No. Cable 1 Shield 1 AA PROTECT GROUND 3 Red 2 BA XMIT'D DATA 5 Black 3 BB RCVD DATA 7 • Green 4 CA REQUEST TO SEND 14 Shield 7 AB SIG GROUND 15 White 20 CD TERM READY 116

Table C.4 D/A Converter Pin Designations Pin No. Designation K Key 1 -15v. 2 +15v. 3 N.C.1 4 REF.t 5 GROUND

6 N.C.1 7 BIT 1 (MSB) 8 N.C. BIT 2 9 N.C. 10 BIT 3 11 N.C. 12 BIT 13 4 14 BIT 5 15 BIT 6 16 BIT 7 17 N.C. 18 BIT 8 19 N.C. 20 N.C. 21 BIT 9 22 N.C. 23 BIT 10 (LSB) 24 OFFSET 25 N.C. 26 OUT 27 SUM JCT 28 N.C. 117

U2 Rl

U5 U6 ©R2 U7 U8

pin 43 pin 1

Figure C-1. Layout of Shutter Timing Board. 118

Ul U2 U3 U4 U5

U6 U7 U8 U9 UIO

Ull U12

pin 43 pin 1

Figure C-2, Layout of RAM Interfaca Board. 119

Ul U2 U3 U4 U5

U6 U7 U8 U9 UIO

pin 43 pin 1

Fi:2ure C-3. Layout of SAM Interface Board. Appendix D Program Listings

I. Fortran Programs A. TRANS.FOR B. CGHl C. HARM D. NORML E. FSET F. FILE G. FILL

II. BASIC Programs A. LABEL B. LSPELL C. MIRALI D. SHTEST E. CALBR8

F. XYPL0T/XYPLT2

'G. LDPL0T/1DFLT2

H. H0L0/HCL02

I. TRANS.EAS

• 120 121

100 PR06RAM TRANS 200 C THIS PROGRAH SENDS A BLOCK OF DATA (MAX4096 PTS) 300 C TO THE COMPII UNDER CONTROL OF BASIC 400 C PR06RAM TRANSf ON THE SYSTEM DISK 500 DIMENSION M(4097) 600 TYPE5 700 5 FORMATdHlí'WELCOME TO PR06RAM TRANS...THIS PROGRAM'/ 300 1 IXi'TRANSMITS A BLOCK OF UP TO 4096 DATA POINTS'/ 900 2 IXT'TO THE COMPUCOLOR II FOR ST0RA6E ON DISK.'/ 1000 3 IXf'THE DATA WILL BE READ FROM FILE PLOT.DAT IN'/ 1100 4 IXr'YOUR DIRECTORY.') 1200 TYPEIO 1300 10 FORMATdXf'HOW MANY POINTS ARE YOU TRANSMITTIN6?') 1400 READ(5rl2) LEN6TH 1500 12 F0RMAT(I6) 1600 0PEN(3»FILE='PL0T.DAT'rSTATUS ='OLD'»RECL=4097) 1700 READ(3r«)(M(I)rI=2»LEN6THTl) 1800 CL0SE(3) 1850 M(l)=64 1900 TYPElll 2000 111 FORMATdXf'DATA ENTEREDr SUITCH CONTROL TO COMPUCOLOR II'/ 2100 1 IXr'USE PR06RAM TRANS.BAS ON SYSTEM DISK') 2200 1=1 2300 1 READ(5»15)K 2400 15 FORMAT(Il) 2500 G0T0(25r26)»K 2600 25 MPR=M(I)+160 2700 WRITE(6) MPR 2800 100 1=1+1 2900 GOTOl 3000 26 STOP 3100 END 122

100 PR06RAM CGHl 200 C THIS PROGRAM GENERATES AND PROCESSES A H0L06RAM 300 C OF THE DOUBLE T IN FILE F0R020.DAT* 400 DIMENSI0NA(128»12B)tRAW(3fl28d28) 500 DIMENSION T(33768) 600 DIMENSION M(3)rINV(32)»S(32) 700 REAL lArMA 800 COMPLEX A»B 900 C ARRAY A HOLDS THE DATA TO BE TRANSFORMED AND THE RESULTIN6 lOCO C TRANSFORM WHEN COMPLETED 1100 C M»INV»S ARE USED BY HARM FFT SUBROUTINE 1200 C RAW HOLDS THE THREE FUNCTIONS UHICH MAKE UP THE 1300 C BURCKHARDT HOLOGRAMS* 1400 C T IS THE TRANSFER ARRAY UHICH HOLDS THE IMAGE WHILE 1500 C IT 13 BEING FFT'D. 1600 C 1700 C FIRST WE READ THE IMA6E DATA STORED IN TT.DAT 1800 C WHICH IS STORED IN LOGICAL UNIT 20 1900 0PEN(20rSTATUS='0LD'»RECL=16384) 2000 READ(20r«)((A(IjJ)»J=lfl28)fI=lrl28) 2100 CLOSE (20) 2200 C 2300 C WE MUST EXCHANGE (ÎUADRANTS BEFORE AND AFTER CALLING HARM 2400 D01I=lr64 2500 D01J=lr64 2600 C FIRST 3WITCH 1 AND 3 2700 B=A(IrJ) 2800 A(IrJ)=A(I+64»J+64) 2900 A(I+64»J+64)=B 3000 C NOW SWITCH 2 AND 4 3100 B=A(IrJ+64) 3200 A(IrJ+64)=A(I+64rJ) 3300 A(I+64rJ)=B 3400 1 CONTINUE 3500 C 3600 C SET UP PARAMETERS TO CALL HARM 3700 DATA(M(I)rI=lr3)/7r7rO/ :J800 IFSET = 1 3900 C PUT A IN A COLUMN VECTORr T 4000 D05J=lrl28 123

4100 D05I=lrl28 4200 MM=2<(128»(J-1)+I)-1 4300 T(MM)=REAL(A(IrJ)) 4400 T(MM+l)=AIMA6(A(IrJ)) 4500 5 CONTINUE 4600 C 4700 C CALL HARM 4800 CALL HARM(TrM»INVrS»IFSET»IFERR) 4900 C CHECK FOR ERROR CONDITION 5000 IF(IFERR)999»3»999 5100 999 TYPEIO 5200 10 FQRMATdH »'AN ERROR HAS BEEN FOUND. • .EXECUTION NOT COMPL 5300 STOP 5400 C 5500 C RETURN FROM HARM...T COMTAINS 4EA TRANSFORM OF T 5600 C NOU READ A FROM THE TRANSFORMED T 5700 3 D06 Jal»128 -5800 D06 Ialrl28 5900 MM=2»d28t(J-l)+I)-l 4000 A(IrJ)=CMPLX(T(MM)rT(MM+l)) 6100 6 CONTINUE 6200 C 6300 C NOU Ue SUITCH QUAORANTS AGAIN

6400 D02I=lr64 6S00 D02J=lr64 6600 B=A(IrJ) 6700 A(IrJ)=A(I+64rJ+64) 6800 A(I+64»J+64)=B 6900 B=A(I»J+64) 7000 A(IrJ+64)=Ad+64rJ) 7100 A(I+64rJ)=B 7200 2 CONTINUE 7300 C 7400 C NOU TO CONVERT THIS ARRAY INTO THE THREE FUNCTIONS 7S0O C UHICH MAKE UP A BURCKHAROT CGH 7600 RANGE1=2.0«3.14159/3*0 7700 RANGE2=4.0«3.14159/3.0 780O C0N1=1.0/(SQRT(3.0)) 7900 C0N2=2.0/(SQRT(3.0)) 8000 004 1=1r128 3100 D04J=lrl28 8200 C FIND MAGNITUDE» MA» AND ANGLE» AN6» OF THE COMPLEX 3300 C VALUE AT EACH POINT IN THE TRANSFORM 3400 C RA IS THE REAL PART» lA IS THE IMA6INARY PART OF A=RA+JtIA 8500 RA=REAL(A(IrJ)) 12^^

3600 IA=AIMA6(A(IrJ)) 3700 MA =SQRT(RA««2+IA«2) 6300 IF (RA)200r25r200 8900 25 ANG=3.14159/2.0 9000 GQT027 9100 200 AN6=ATAN2(IArRA) 9200 IF(AN6)225r27r27 9300 225 ANG=ANG+2.0«3.14159 9400 27 IF(0.0.LE.ANG.AND.ANG.LT.RAN6E1)60T0101 9500 IF(RAN6E1.LE.AN6.AND.AN6.LT.RAN6E2)60T0102 9600 C THEN AN6 MUST BE BETWEEN RAN6E2 AND 2«PI 9700 SINA=SIN(AN6-RAN6E2) 9800 C0SA=C0S(AN6-RAN6E2) 9900 FUNC1=C0N2«MA«SINA 10000 FUNC2=0.0 10100 FUNC3=MA«C0SA+C0N1«MA«SINA 10200 G0T035 10300 101 SINA=SIN(AN6) 10400 COSA=COS(ANG) 10500 FUNC1=MA«C0SA+C0N1«MA«SINA 10600 FUNC2=C0N2«MA«SINA 10700 FUNC3=0.0 10800 G0T035 10900 102 SINA=SIN(ANG-RAN6E1) 11000 C0SA=C0S(AN6-RANGE1) 11100 FUNC1=0.0 11200 FUNC2=MA«C0SA+C0N1«MA«SINA 11300 FUNC3=C0N2«MA«SINA 11400 35 RAU(lrIrJ)=FUNCl 11500 RAU(2yIrJ)=FUNC2 llûOO RAU(3rIrJ)=FUNC3 11700 4 CONTINUE 11800 C 11900 C NOW CALL NORML TO CONVERT THIS DATA INTO PLOT DA 12000 LENGTH=128 12100 CALL NORML(RAUrLENGTH) 12200 STOP 12300 ENO 125

100 SUBROUTINE HARM(A»M»INv'rS»IFSET»IFERR) 200 C 300 C 400 c SUBROUTINE HARM 500 c 600 c ...... PURPOSE 700 c PERFORMS DISCRETE COMPLEX FOURIER TRANSFORMS ON A COMPLEX 800 c THREE DIMENSIONAL ARRAY. 900 c 1000 c USAGE.. 1100 c CALL HARM (A»MrINVrSrIFSETrIFERR) 1200 c 1300 c DESCRIPTION OF PARAMETERS , 1400 c A AS INPUTr A CONTAINS THE COMPLEXr 3-DIMENSIONAL 1500 c ARRAY TO BE TRANSFORMED. THE REAL PART OF 1600 c A(IlrI2rI3) IS STORED IN VECTOR FASHION IN A CELL 1700 c WITH INDEX 2«(I3«N1«N2 + I2«N1 + II) + 1 UHERE 1800 c NI = 2««M(I)r I=lr2r3 AND II = Orlr...rNl-l ETC. 1900 c THE IMAGINARY PART IS IN THE CELL IMMEDIATELY 2000 c FOLLOUING. NOTE THAT THE SUBSCRIPT U INCREASES 2100 c MOST RAPIDLY AND 13 INCREASES LEAST RAPIDLY. 2200 c AS OUTPUTr A CONTAINS THE COMPLEX FOURIER 2300 c TRANSFORM. THE NUMBER OF CORE LOCATIONS OF 2400 c ARRAY A IS 2«(NlrN2rN3). 2500 c M A THREE CELL VECTOR WHICH DETERMINES THE SIZES 2600 c OF THE 3 DIMENSIONS OF THE ARRAY A. THE SIZEr 2700 c Nlr OF THE I DIMENSION OF A IS 2««M(I)r I=l»2»3. 2800 c INV — A VECTOR UORK AREA FOR BIT AND INOEX MANIPULATION 2900 c OF DIMENSION ONE FOURTH THE QUANTITY 3000 c MAX(NlrN2rN3) 3100 c S A VECTOR UORK AREA FOR SINE TABLES UITH DIMENSION 3200 c THE SAME AS INV 3300 c IFSET— AN OPTION PARAMETER UITH THE FOLLOWING SETTINGS 3400 c 0 SET UP SINE AND INV TABLES ONLY 3500 c 1 SET UP SINE AND INV TABLES ONLY AND 3600 c CALCULATE FOURIER TRANSFORM 3700 c -1 SET UP SINE AND INV TABLES ONLY AND 3800 c CALCULATE INVERSE FOURIER TRANSFORM (FOR 3900 c THE MEANING OF INVERSE SEE THE EQUATIONS 4000 c UNDER METHOD BELOW) 4100 c 2 CALCULATE THE FOURIER TRANSFORM ONLY (ASSUME 4200 c SINE AND INV TABLES EXIST) 4300 c -2 CALCULATE INVERSE FOURIER TRANSFORM ONLY 4400 c (ASSUME SINE AND INV TABLES EXIST) 126

4500 C IFERR— ERROR INDICATOR. WHEN IFSET IS 0» +lr -Ir 4600 c IFERR = 1 MEANS THE MAXIMUM M(I) IS GREATER THAN 4700 c 20r I=lr2r3. WHEN IFSET IS 2r -2» IFEER = 1 4800 c MEANS THAT THE SINE AND INV TABLES ARE NOT LARGE 4900 c ENOUGH OR HAVE NOT BEEN COMPUTED. 5000 c IF ON RETURN IFERR = Or THEN NONE OF THE ABOVE 5100 c CQNDITIONS ARE PRESENT. 5200 c 5300 c ..»....»».REMARKS..«...... •..*»*«.•**«•.•»....I 5400 c THIS SUBROUTINE IS TO BE USED FOR COMPLEX» 3-DIMENSIONAL 5500 c ARRAYS IN WHICH EACH DIMENSION IS A POUER QF 2. THE 5600 c MAXIMUM M(I) MUST NOT BE LESS THAH 3 OR GREATER THAN 20r 5700 c I=lr2»3. 5300 c 5900 c SUBROUTINES AND SUBPROGRAMS REQUIRED. 6000 c NONE 6100 c 6200 c METHOD 6300 c FOR IFSET = +1 OR +2» THE FOURIER TRANSFORM OF THE COMPLEX

6400 C ARRAY A IS OBTAINED. 6500 C 6600 C Nl-1 N2-1 N3-1 Ll L2 6700 c X(J1»J2»J3)=SUM SUM SUM A(KlrK2rK3)«Wl «U2 6800 c K1»0 K2=0 K3=0 6900 c 7000 c UHERE UI IS THE N(I) ROOT OF UNITY AND Ll=Kl«Jlr 7100 c L2=K2«J2r L3=K3«J3 7200 c 7300 c 7400 c FOR IFSET = -Ir OR -2» THE INVERSE FOURIER TRANSFORM A OF 7S00 c COMPLEX ARRAY X IS OBTAINED. 7600 c 7700 c A(Kl»K2rK3) 7800 c 1 Nl-1 N2-1 N3-1 -Ll 7900 c •«SUM SUM SUM X(J1»J2»J3)«U1 «U2 3000 c N1«N2«H3 J1=0 J2=0 J3=0 8100 c 8200 c 8300 c SEE J.U. COOLEY AND J.U. TUKEYr 'AM AL60RITHM FOR THE 8400 c MACHINE CALCULATION OF COMPLEX FOURIER SERIES'r 3500 c MATHEMATICS OF COMPUTATIQNSr VOL. 19 (APR»196S)» P. 297 8600 c 8700 c 8800 c 8900 c 127 9000 DIMENSI0NA(33763)rINV(32)rS(32)rN(3)rM(3)rNP(3) rU(2)r 9100 EQUIVALENCE (NlrN(1)).(N2rN(2))r(N3rN(3)) 9200 10 IF (lABS(IFSET) - I)900r900rl2 9300 12 MTT=MAX0(M(l)rM(2)»M(3))-2 9400 R00T2 = SQRT(2.0) 9500 IF (MTT-MT)14rl4rl3 9600 13 IFERR=1 9700 RETURN 9800 14 IrERR=0 9900 M1=M(1) 10000 M2=M(2) 10100 M3=M(3) 10200 M1=2««M1 10300 N2=2««M2 10400 N3=2««M3 10500 16 IF (IFSET)18rl8r20 10600 13 NX=N1«N2«N3 10700 FH=MX 10800 D019I=lrNX 10900 A(2«I-1)=A(2«I-1)/FN 11000 19 A(2«I)=-A(2«I)/FH 11100 20 NP(1)=N1«2 11200 NP(2)=NP(1)«N2 11300 NP(3)=NP(2)«N3 • 11400 0025010=1»3 11500 IL=NP(3)-NP(ID) 11600 IL1=IL+1 11700 MI=M(ID) 11800 IF(MI)2S0»250»30 11900 30 IOIF=NP(ID) 12000 K3IT=NP(ID) .12100 MEy=2«(MI/2) 12200 IF(MI-MEV)60T60»40 12300 C 12400 C M IS 000. 00 L=l CASE 12500 40 KBIT=KBIT/2 12600 KL=KBIT-2

12700 DOSOI=lrILl»IOIF 12800 KLAST=KL+I 12900 D0S0K=I»KLASTr2 13000 KD-K+KBIT 13100 C 13200 C DO ONE STEP UITH L=1»J=0 13300 C A(K)=A(K)+A(KO) 13400 C A(KD)=A(K)-A(KD) 128

13500 C 13600 T=A(KO) 13700 A(KD)=A(K)-T 13800 A(K)=A(K)+T 13900 T=A(KD+1) 14000 A(KD+1)=A(K+1)-T 14100 50 A(K+1)=A(K+1)+T 14200 IF(MI-1)250»250»52 14300 52 LFIRST=3 1-400 C 1'Î500 c DEF - JLAST=2««(L-2)-l 14600 JLAST=1 14700 60T070 14800 c 14900 c M IS EVEN 15000 60 LFIRST=2 r5100 JLAST=0 15200 70 D0240L=LFIRST»MI»2 15300 JJOIF=KBIT 15400 K3IT=KBIT/4 15500 KL=KBIT-2 15600 c 15700 c DO FOR J=0 15300 D080I=1»IL1»IDIF 15900 KLAST=I+KL 16000 0080K=I»KLAST»2 16100 K1=K+KBIT 16200 K2=K1+KBIT 16300 K3=K2+KBIT 16400 c 16500 c 00 TWG STEPS UITH J=0 16600 c A(K)=A(K)+A(K2) 16700 c A(K2)=A(K)-A(K2) 16800 c A(K1)=A(K1)+A(K3) 16900 c A

18300 T=A(K3) 18400 A(K3)=A(K1)-T 18500 A(K1)=A(K1)+T 13600 T=A(K3+1) 13700 A(K3+1)=A(K1+1)-T 18800 A(K1+1)=A(K1+1)+T 18900 C

19000 T=A(K1) 19100 A 22200 c A

22800 A(K2)=A

25300 IF

27300 110 W2(l)=0. 27400 U2(2)=l. 27500 G0T0130 27600 C 27700 .^ 2«I IS IN SECOND QUADRANT L 27800 120 I2CC=I2C+NT 27900 • I2C=-I2C 28000 U2(1)=-S(I2C) 23100 W2(2)=S(I2CC) 23200 130 13=1+12 23300 I3C=NT-I3 28400 IF(I3C)160»150»140 28500 C 28600 C 13 IS IN FIRST QUADRANT 28700 140 U3d)=S(I3C) 28800 U3(2)=S(I3) 23900 G0T0200 29000 150 W3<1)=0. 29100 W3(2)=l. 29200 G0T0200 29300 C 29400 160 I3CC=I3C+NT 29500 IF(I3CC)190»180»170 29600 C 29700 C 13 IS IN SECOND QUADRANT 29800 170 I3C=-I3C 29900 U3(1)=-S(I3C) 30000 W3(2)=S(I3CC) 30100 60T0200 30200 180 W3(l)=-1» 30300 W3(2)=0. 30400 G0T0200 30500 C 30600 C 3«I IS IN THIRD QUADRANT 30700 190 I3CCC=NT+I3CC 30800 I3CC=-I3CC 30900 W3d)=-S(I3CCC) 31000 U3(2)=-S(I3CC) 31100 200 ILAST=IL+JJ 31200 D0220I=JJ»ILAST»IDIF 31300 KLAST=KL+I 31400 D0220K=I»KLAST»2 31500 K1=K+KBIT

31600 K2=K1+KBIT 31700 K3=K2+KBIT 132

51800 C 31900 C DO TUO STEPS UITH J NOT 0 32000 C A(K)=A(K)+A(K2)«U2 £2100 C A(K2)=A(K)-A(K2)«U2 32200 C A(K1)=A(K1)«U+A(K3)«U3 32300 C A(K3)=A(K1)«U-A(K3)«U3 32400 c 32500 c A(K)=A(K)+A

36600 250 CQNTINUE 36700 C ENO OF 10 LOOP 36800 c 36900 c WE NOU HAVE THE COMPLEX FOURIER SUMS BUT THEIR ADDRESSES 37000 c BIT REVERSED. THE FOLLOUING ROUTINE PUTS THEM IN ORDER 37100 NTSQ=NT«NT 37200 M3MT=M3-MT 37300 3S0 IF(M3MT)370»360»360 37400 C 37S00 C M3 GR. OR EQ. MT 37600 3Å0 IG03=1 37700 N3VNT=H3/NT 37800 MINH3=NT

37900 Q0T0380 38000 C 33100 C M3 LESS THAN MT 38200 370 IG03=2 38300 N3VNT=1 33400 NTVN3=NT/N3 38500 MINN3=N3 38600 380 JJD3»NTSQ/N3 38700 M2MT=M2-MT 38800 450 IF(M2MT)470»460»460 38900 C 39000 C M2 GR. OR EQ. MT 39100 460 1602=1 39200 N2VNT=N2/NT 39300 MINN2=NT 39400 G0T0480 39500 C 39600 C M2 LESS THAN MT 39700 470 1602=2 39800 M2VMT = 1 39900 MTVH2=MT/N2 40000 MINN2=N2 40100 480 JJD2=MTSQ/H2 40200 M1MT=MI-MT 40300 5S0 IF

41100 C Ml LESS THAN MT 41200 570 1601=2 A1300 N1VNT=1 41400 NTVN1=NT/N1 41500 MINN1=N1 41600 580 JJD1=NTSQ/N1 41700 600 JJ3=1 41300 J=l 41900 00880 JPP3=1»N3VNT 42000 IPP3=INV

44200 G0T0830 44300 820 IP1=INV(JP1)/NTVN1 44400 330 I=2«(IPP1+IP1)+1 44500 IF(J-I)840»850»850 44600 840 T=A

45600 C ••5700 370 JJ2=JJ2+JJ02 45300 C END OF JPP2 AND JP3 LOOPS 45900 C 46000 880 JJ3=JJ3+JJD3 46100 C END OF JPP3 LOOP 46200 C 46300 890 IF(IFSET)891»89S»895 46400 391 008921=1rNX 46500 392 A(2«I)=-A(2«I) 46600 395 RETURN 46700 C 46800 THE FOLLOUING COMPUTES THE SINE 46900 c 47000 900 MT=MAX0(M(l)rM(2)»M(3))-2 47100 MT=MAX0(2>MT) 47200 904 IF(MT-18)906»906»13 47300 C 47400 C 47500 906 IFERR=0 47600 NT=2««MT 47700 NTV2=NT/2 47800 C 47900 C SET UP SIN TABLE 43000 C THETA= PI/2««(L+1) FOR L=l 48100 910 THETA=.7853981634 48200 C 48300 C JSTEP=2««(MT-L+1) FOR L=l 48400 JSTEP=NT 48500 C 43600 C J0IF=2««(MT-L) FOR L=l 48700 C 48800 JDIF=NTV2 48900 S(JOIF)=SIN(THETA) 49000 D0950L=2»MT 49100 THETA=THETA/2. 49200 JSTEP2=JSTEP 49300 JSTEP=JDIF 49400 JDIF=JSTEP/2 49500 S(JDIF)=SIN(THETA) 49600 JC1=NT-JDIF 49700 S(JC1)=C0S(THETA) 49800 JLAST=NT-JSTEP2 49900 IF(JLAST-JSTEP)950»920»920 50000 920 DO 940J=JSTEP»JLAST»JSTEP 50100 JC=NT-J 50200 JD=J+JDIF 50300 940 S(J0)=S(J)«S(JC1)+S(JDIF)«S(JC) 50400 950 CONTINUE 136

50500 C 50600 C SET UP INV TABLE 50700 C 50800 960 MTLEXP=NTV2 50900 C 51000 C MTLEXP=2»«(MT-L) FOR L= 51100 LM1EXP=1 51200 c 51300 c LM1EXP=2»<(L-1) F0RL=1 51400 INV(1)=0 51500 D0980L=lrMT 51600 INV(LM1EXP+1)=MTLEXP 51700 D0970J=2»LM1EXP 51800 JJ=J+LM1EXP 51900 970 INV(JJ)=INV(J)+MTLEXP 52000 MTLEXP=MTLEXP/2 52100 980 LM1EXP=LM1EXP<2 52200 982 IF(IFSET)12»895rl2 52300 END 137

100 SUBROUTINE NORML(RAU»LENGTH) 200 C THIS PROGRAM NORMALIZES AND DIGITIZES YOUR DATA 300 C BEFORE IT CAN BE TRANSMITTED TO THE COMPUCOLOR II 400 DIMENSION FILM(64)»RAU(3»128»128)rPL0T(3r128»128) 500 DIMENSION 6(256) 600 BYTE PLOT 700 INTE6ER FQ 800 C FQ IS THE NUMBER OF 5RAY LEVELS YOU UANTr 64 OR 256 900 C CHAN6E THE NEXT LINE TO SET FQ 1000 FQ=64 1100 C FILM HOLDS THE FILM CURVES 1200 C RAU HOLDS YOUR RAU DATA 1300 C LEN6TH IS THE LEN6TH OF ONE SIDE OF YOUR (SQUARE) IMA6E 1400 C PLOT HOLDS THE NORM'D AND DIQ'D DATA 1450 C 1500 C WE NEED TO FINO THE UPPER AND LOWER BOUNDS ON RAW DATA 1600 C DATMAX IS UPPER BOUNOr DATMIN IS LOWER BOUND 1700 DATMAX = 0.0 1800 DATMIN =0,0 1900 D050I=1?3 2000 D050J=lrLEN6TH 2100 D050K=lrLEN6TH 2200 R = RAW(IrJrK) 2300 IF(R.6T.DATMAX) DATMAX = R 2400 IF(R.LT.DATMIN) DATMIN = R 2500 50 CONTINUE 2550 C 2600 C WE MAKE THE DATA N0NNE6ATIVE AND NORMALIZE IT 2700 C TQ THE 0.0 TO 0.5 RANGE 2800 DATMIN=-1.0

4400 DELF=(FILM(I)-FILM(I+l))/4.0 4500 J = (1-1X4 4600 DOIOO K=l»3 4700 G(J+K)=FILM(I)-K«DELF 4800 100 CONTINUE 4325 Q0T02 4850 C IF FQ = 64» UE LEAVE THE FILM DATA AS IS 4900 1 00120 I=lr64 5000 6(I)=FILM(I) 5100 120 CONTINUE 5150 C - 5200 C USING THE FILM DATA» UE DIBITIZE TEMP 5300 2 00 97 1=1,3 5400 0097J=1»LENGTH 5500 D097K=1»LENGTH 5600 D095 N = IrFQ

5700 L=N 5800 F=(G

100 PR06RAM F3ET 200 C THIS PROGRAM LOADS DATA FROM THE FILM CURVES 300 C YOU MUST ENTER THE TRANSMITTANCE C0RRESP0NDIN6 TO THE 400 C INTE6ERS 1 TO 64»(REALLY 0 TO 63)»WHERE 63 IS THE 500 C MAXIMUM EXPOSURE TIME AND 0 IS THE MINIMUM 600 C THE DATA IS STORED IN FILE FILM.DAT» WHICH IS UNIT 2 700 DIMENSION F(64) 300 D020I=lr64 900 TYPE12rI 950 C TERMINAL PROMPTS USER 1000 12 FORMATdXr'ENTER TRANSMITTANCE FOR POINT '»13) 1050 C USER RESPONDS WITH TRANSMITTANCE VALUE 1100 READ(5rlO) 0 1200 10 F0RMAT(F10.6) 1300 F(I)=D 1400 20 CONTINUE 1450 C NOW STORE FILM CURVE IN FILE FILM.DAT 1500 0PEN(2rFILE='FILM»DAT'rSTATUS ='NEW'»RECL=65) 1600 WRITE(2»«)(F(I)»I=1»64) 1700 CL0SE(2) 1800 STOP 1900 END iko

^^^ PR06RAM FILE 200 BYTE N ?í? OIMENSION N<4096) ^^<^ DO 10 I=l»4096 Ann ic JJ=INT

100 PROGRAM FILL 200 DIMENSION 6(4096) 300 BYTE 6 400 C THIS IS A SAMPLE PROGRAM TO DEMONSTRATE 500 C THE USE OF THE FILE CONTROL SYSTEM. 600 C THIS PROGRAM READS A FILE» TEST.DAT» 700 C AND PRIMTS A SAMPLE OF THE DATA. 800 QPEN(3»FILE='TEST.DAT'»STATUS='OLD'»RECL=4096) 900 REA0(3»«)(G(I)»I=1»4096) 1000 CL0SE(3) 1100 WRITE(6»10)(G

1.0 RE!^ LABEL 20 REM THIS PPOGRAM GENERATES LABELS OF 5X7 Dn"^ MATRIX 30 REíl CHARACT RS ON FILM ^O IM A(50,5,7) : REM THIS HOLDS ASCII. DO"^ INFO 45 DIM R$(50) : REM R$ HOLDS ALPHABET AND NUMBERS,ETC 50 DIM S$(16) : REM S* HOLDS THE LABEL TO PRINT 60 DIM PLT(16,577) : REM PLT FOLDS DHT INFO TO =" OT 70 PLOT 12 30 PRINT "WELCOME TO PROGRAM LABEL" 100 LOAD "A.ARY" : REM THIS IS ASC 190 DATA "0"j"1"j"2"7"3"»"4","5","6">"7">"S">"?" 200 DATA "A","T 300 FOR K=l TO 16 310 L=K 320 INPUT "ENTER CHARACTORS ONE AT A TIME "?S$(K) 330 IF (S$(K)="$") THEN 390 340 PRINT S$(K) 350 NEXT K 390 REM INTERPRET STRÍNG 400 FOR 1=1 TO L 500 FOR J=0 TO 50 550 IF (S$(I)=R*(J)) GOTO 600 920 NEXT I 945 REM ENTER LOCATION OF FIRST LETTER IN 256X256 946 REM FILM PLANE. 950 INPUT "ENTER COORDINATES OF FIRST LETTER ";X>Y 955 PLT(0,1.1)=X : PLT(0, ,2)=Y 956 PLT(0,1,0)=L 990 PRINT "REMOVE SYSTEM DISK ALIST 995500 950 INPUT "ENTER COORDINATES OF FIRST LETTER ";X>Y 955 PLT(0,1,1)=X : PLT(0>1> 2)=Y 956 PLT(0>1,0)=L 990 PRiNT "REMOVE 3YSTEM DISK AND LOAD DATA DISK" 9'-'5 INPUT "THEN PRESS RETURN";H 1000 SAVE "PLT.ARY" 142

10 REM LSPELL 15 PLOT 12 20 DIM PLT(16,5.7) 30 LOAD "PLT.ARY" 40 REM PLOTS UP TO 16 CHARACTORS/LINE 50 REM AT 12SX12S RESOLUTION 60 REM REQUIRES A BLOCK OF 3 X 12P PniNT--- TO PC--.^ 'oL-™-V-î^ '• ^^=^^^<0>1,2) r-REM^ u9S0RPn:^I--... 100 ÍOR i=i';o L' ^^"^ ' '^ "'" '^^''' "^ THE.LAPEL'*-' 200 FOR X=l TO 5 250 FOR Y=l TO 7 255 IF (PLT(I,X,Y) = 1) THEN 2^s0 256 GOTO 350 260 XP=X1-X : YP=Y1-Y 270 XP=2-*XLIST 250 250 FOR Y=l TO 7 255 IF (PLT(I,X.Y)=1) THEN 2AO 256 GOTO 350 260 XP=X1-X : YP=Y1-Y 270 XP=2*XP : YP=2*YP 300 OUT 239, XP : OUT 253, YP : 01 !T 247, tpP 350 NEXT Y,X 400 X1=X1-S 450 NEXT I

I REM PROGRAM MIRALI 3 PLOT 12 : PLOT 15 5 PRINT "THIS PROGRAM MOVES -THE LASER AROUND •"••^E COPNERS" 6 PRINT "OF THE FILM PLANE. THE FOUR DOTS DEFINE ^HE " 7 PRINT "SIZE OF THE PLOT. ADJUST THE INPUT AT^^EN AND" 3 PRINT "OFFSET CONTROLS ON THE SCANNER COM"^RCLLERS" 9 PRINT "TO P03ITI N THE F UR D TS N THE FILM PLA-^E. " 10 PRINT "TO BEGIN, ENTER ARRAY SIZE (123,256,512 OR 1024)" II PRINT "ENTER 1024 FOR ALL RAM PLOTTING." 12 INPUT SIZE : PLOT 14 13 3I2E=3IZE/4-l 15 OLIT 239,0 ; OUT 253,0 20 OLIT 247,64 30 OUT 239,SIZE : OUT 253,0 40 OUT 247,64 50 OUT 23*^sSI2E : OUT 253,SIZE 60 OUT 247;64 70 OUT 239,0 : OUT 253.SIZE 30 OUT 247,64 90 GOTO 15 143

10 REM PROGRAM SHUTTER TEST, SHTEST.BAS:! 15 PLOT 12,15 20 PRINT "AS AN AID TO ALIGNMENT, THIS PRC RAn WILL C NTINL'E" 25 PR NT "TO PULSE THE A/0 SHUTTER UNTIL YOU -•RESS THE" 26 PRINT "BREAK (DOWN ARROW) KEY." 30 OUT 239,12S : OUT 253,123 40 OUT 247,255 50 FOR 1=1 TO 5 60 NEXT I 70 GOTO 40 30 c-LOT 14

10 REM PROGRAM CALBRS...USE TO DETERMÎNE EXPOSURE TIMES 12 PLO^ 15 13 PLOT 12 14 f^'RINT "CALBR3" 15 PRINT "THIS PROGRAM PLOTS A SQUARE ARRAY OF 256" 16 PRINT "UNIFORMLY SPACED DOTS. EACH DOT HAS" 17 PRINT "TRANSMITTANCE = 1. USE THIS TO SET EX=-OS!JRE" 13 PP NT "TIMES AND FOCAL DISTANCES FOR DIFFERENT " 19 í^'PINT "FILMS, LENSES, ETC. " 20 l^-RINT "THE EXPOSURE WILL BEGIN AS SOON AS" 21 PRINT "YOU PRESAR LOWEST TWO BITS OF X AND Y 32 OUT 251,0 : OUT 254,0 34 REM BEGIN PLOTTING 35 FOR 1=0 TO 255 STEP STPl 40 FOR J=0 TO 255 STEP STP2 50 OUT 239,1 : OUT 253, J 60 OUT 2^7,255 100 NEXT J 110 PRINT I : PLOT 12 130 NEXT I 140 INPUT "PRESS RETURN FOR SHUTTER TEST..."ÎX 145 OUT 239,123 : OUT 253,123 150 OUT 247,255 : GOTO 150 144

10 REM PROGRAM XYPLOT, XY PLOTTER OPERATING •^v-TE'^ 20 PLOT 12 : REM CLEAR SCREEN 30 PLOT 6,^ : PLOT 14 : REM SET LARGE CHARArTfîR'-, '^H TO B; • •E'"RE EN 40 PRINT "WELCOME TO " : PL T 3,12,0 : PLOT 6,3 : PRINT "XY" 50 PLOT 3,14,0 : PLOT 6,1 : PRINT "PLOT " : '='LOT 3, 19V0 : PLOT 6

60 PRINT "—A GENERAL PLOTTING ROUTINE" 65 PRINT : PLOT 6,2 66 PLOT 15 70 PRINT "DO YOU NEED INSTRUCTIONS" " 130 PLOT 3,3,0 : PLOT 6,2 : PRINT "A GENERAL PLOTTING ;-:OUTINE. 140 PLOT 3,0,4 : PRINT "IN THIS CONFIGURATION THE " 150 PLOT 3,26,4 : PLOT 6,1 PRINT "LASER PLOT^ER " 160 PLOT 3,40,4 : PLOT 6,2 PRINT 220 PLOT 3,23,3 : PLOT 6,2 PRINT "SPECIFIED BY Y UR " 230 PLOT 3,41,3 : PLOT 6,3 PRINT "DATA SET." 240 PLOT 6,2 : PRINT "A " : PLOT 3,2,10 : PLOT 6,1 : PRINT "POIN T " 250 PLOT 3,S,10 : PLOT 6,2 : PRINT "IS DEFINED BY THE FOLLOWING 260 PLOT 3,310 PLOT 3,6,13 PLOT 6,3 : PRINT "F(X,Y) " 320 PLOT 3,14,13 : PLOT 6,2 PRINT "IS THE VALUE OF THE DATA AT THE " 330 PLOT 3,47,13 : PLOT 6,1 PRINT "POINT " 340 PLOT 3,53,13 : PLOT 6,2 PRINT "X,Y." 350 PRINT "OVER A MILLION " 3604 : REM SET BIG LETTERS 450 PLOT 12 : PRINT "THE " 460 PLOT 3,5,0 : PLOT 6,1 : PRINT "X AND Y COORD NATE 470 PL T 3 25,0 : PLOT 6,2 : PRINT "ARE DEFINED AS SHOWN:" 430 PLOT 2 30,60,242,30,100,30,100,30,60,30,60 ^ 255 435 PLOT 1 490 PLOT 3 15,IS : PRINT "N ... 540 PLOT 3 13,15 : PRINT "1" : PLOT 3,13,16 : PRINT "0" 550 PLOT 3 5,11 : PLOT 6,7 : PRINT "Y-AXIS" 560 PLOT 3 22,11 : PLOT 6,3 : PRINT "FILM PLANE" 570 PLOT 3 13,2^ : PLOT 6,2 : PRINT "WHERECLEAR SCREEN 660 PLOT 6 3 : PRINT "F(X,Y) " 670 PLOT 3 7,0 : PLOT 6,2 : PRINT "13 THE VALUE OF " 630 PLOT 3,23,0 : PLOT 6,5 : PRINT "YOUR DATA " 145

690 PL T 3,33,0 : PLOT 6,2 : PRINT "AT THE POINT" 700 PL T 3,46,0 : PLOT 6,1 : PRINT "X,Y" 710 PLOT 3,49,0 PL T 6,2 :0T 3,17,4 : PLOT 6,2 : PRINT "THE " 790 PLOT 3,21,4 PL T 6,1 : PRINT "MAXIMUM VALUE " 300 PLOT 3,35,4 PL T 6,2 : PRINT "ATTAINED BY " 310 PLOT 3,47,4 PLOT 6,3 : PRINT "F(X,Y)" 320 PLOT 3,0,6 ! PLOT 6,2 : PRINT "AND THE NUMBER OF " 830 PL T 3,13,6 PLOT 6,7 : PRINT "GRAY LEVEL3 " SS5 PL T 15 390 PLOT 3,5,10 PLOT 6,2 : PRINT "EXAMPLE..." 900 PLOT 3,5,12 PRINT "SUPPOSE THAT YOU WANT TO PLOT THE FOLLO WING FUNCTI N:" 910 PLOT 3,10,14 : PLOT 6,3 : PRINT "F(X,Y) = r:250*SINC( X+Y) n 920 PLOT 3,5,16 : PLOT 6,2 : PRINT "IN THE REGIOR RESOLUTION" 1000 PLOT 3,5,22 : PRINT "IF YOU USE THIS FUNCTîON:" 1010 PLOT 3,10,24 PLOT 6,3 : PRINT "F(X,Y) = n250*31NC C(X+Y)/1 0:ri" 1020 PLOT 3,40,24 PLOT 6,6 : PRINT ", 0 < X,Y < 100." PLOT 6,2 : PRINT "NOW " 1030 PLOT 3,5,26 PLOT 6,1 :,30 : PLOT 6,4 : PRINT "TO CONTINUE, 1040 PLOT 3,9,26 1130 PLOT 3,45,30 PLOT 6,0 : INPUT X : PLOT 6,2 1140 PLOT 12 1150 PLOT 14 : PLOT 6,2 : PRINT "FORMATTING THE " 1160 PLOT 3,15,0 : PLOT 6,3 : PRINT "DATA SET." 1170 PLOT 15 : PLÛT 3,0,3 : PLOT 6,2 : PRINT "YOUR DATA SET 13 E NTERED INTO THE " 113 )." PLÛT 6,2 : PRINT "IN THIS MODE, THE THREE QUA 1250 PLOT 3,6,10 NTITIES" PLOT 6,1 : PRINT "X-COORDINATEî" 1260 PLOT 3,6,12•T * • PLOT 6,6 PRINT "Y-COORDINATE;" 1270 PLOT 3,20,12 PLOT 6,3 PRINT "F(X,Y) ," 1230 PLOT 3,34,12 1290 PLOT 3,6,1" PRINT "ON YOUR DATA DISK." 1350 PLOT 3,27,16 : PLOT 6,2 PRINT "FOR EXAMPLE... " 1360 PLOT 3,0,13 : PLOT 6,2 PRINT "RAF(1,0) = X-COORDINATE CF 137Î%T0 PLÛP0 TN4Í:07L0 3,15,13T S^lsT^s': PLÛT 6,: 6 PRINT "RAF(N,1) = Y-COORDÎNATE OF NTH 1440 PL T -^,15,26 : PRINT "RAF(N,2) = F(XN,YN)" 1450 PL í ^^^': PLOT 6,5 : PRINT "TO CONTINUE, PRESS RETURN. " 1460 PLOT 3,50,29 : PLOT 6,0 : INPUT X : PLOT 6,2 Î475 PL í Í:7 : PRINT "(2)...SEQUENTIAL ACCESS FORMATTING ( SAF ) " lA'-'f^ OPI riT ••^.•->o,4 ; PLOT 6,5 : PRINT "N X M " -30 proT -r^íÍA : PLHT 4.72 : PRINT •'DATA SET 13 STORED' -! phoT Í 1,1. : PLOT 6 4 : PRINT "SEGUENTIALLY. BY ROWS •• 570 PLoT 5 23^6 : PLOT 6,2 : PRINT "IN A VECTOR CALLED " 146

1530 PLOT ,4:/ , 6 PLOT 6,7,16 : PRINT "2 4 /. <• 1650 PLOT 3 ,40,14 PLOT 6,5 : PRINT SAF(l) = 0" 1660 PLOT 3 ,40,15 PRINT "SAF(2) = 1 1670 PLOT 3 ,40,16 PRINT "SAF(3) = 2 16.30 PLOT ,40,17 PRINT "SAF(4) = 2 1690 PLOT 3 ,40,13 PRINT "SAF(5) = 4 1700 PLOT ,40,19 PRINT "SAF(6) = 6 1710 3,0,2 PLOT 6,2 PRINT "TO BEGIN PLOTTING, 1770 PLOT ,19,27 : PLOT 6,5 PRINT "PRESS P, i'HEN PETURN. " 1730 INPUT X* 1790 IF X$="P" GOTO 2000 1300 LOAD "MENU2.BAS" : RUN 2000 LOAD "XYPLT2.BAS" : RUN 5000 PLOT 6,2 : PLOT 15 147

10 REM PROGRAM XYPLT2 20 REM THIS PROGRAM D0E3 THE ACTUAL PLQTTINn 25 OUT 253,0 : REM THIS CLEARS SAM INTERFACE 30 PLOT 12 : REM CLEAR SCREEN 40 PLOT 14,6,3 : REM SET BIG LETTERS AND FG=YELLnw 42 DF=1 45 GOTO 1000 50 PLOT 12 60 PLOT 15 70 PLOT 3,5,4 : PLOT 6,2 : PRINT "HOW MANY POINTS DO YOU WANT TO PLOT ALONG THE X-AXIS?" 30 INPUT N : IF N<1025 THEN 90 32 PLOT 6,7 : PRINT "THIS NUMBER CANN T EXCEED 1024, TRY AGAIN." S6 GOTO 30 90 PLAX=5-»IMAX 120 PLOT 12,6,1 14130 PLOT 2,32,32,242,32,96,96,96,96,32,32,323,16,25 PLOT 6,2 : PRINT "0 1 2 ..., 25" 5 150 PLOT 3,45,25 PRINT N 160 PLOT 3,23,27 PRINT "X-AXIS" 170 PLOT 3,14,23 PLOT 6,3 : PRINT "O" 130 PL70 PLOT 12 REM CLEAR SCREEN 345 PLOT 3,5,26 PLOT 6,7 PRINT "REMOVE THE SYSTEM DISK AND P LACE" 346 PLOT 3,5,23 PLOT 6,4 PRINT "YOUR DATA DISK IN THE DISK D RIVE. " 347 PLOT 3,5,30 PLOT 6,2 P PLOT 3,20,0 : PLOT 6,1 : PRINT 330 PLOT 15 390 PLOT 3,10,4 PLOT 6,7 PRINT "PRESS WHEN EACH STEP HAS BEEN COMPLETED." 400 PL0,10 : PLOT 6,1 : PRINT "SERVO-DRIVERS ON'^" 450 PLOT 3,60,10 PLOT 6,0 : INPUT X PLOT 6,2 : PRINT "SERVO- DRIVERS ON." 460 PLOT 3,10,10 P PRINT "LASER WARNING LIGHT ON. " 470 PLOT 3,10,12 PLOT 6,1 PRINT "LASER ON?" 530 PL T 3,10,16 PLOT 6,0 540 PLOT 3,60,16 INPUT X 550 PLOT 3,10,16 PLOT 6,2 PRINT "LASER ON." 560 PLOO : PLOT 6,0 : INPUT X PRINT "SHUTTER PROPERLY ALIGNED." 610 PLOT 3,10,20 PLÛT 6,2 PLOT 6,1 PRINT "ALL LIGHTS OFF?" 620 PLOT 3,10,22 PLOT 6,0 INPUT X 630 PLOT 3,60,22 PRINT "ALL LIGHTS OFF." 640 PLÛT 3,10,22 PLOT 6,2 645 PLOT 6, : PRINT "GET READY TO OPEN THE SHUTTER" 675 REM PLOT SQUARE .^ .,_ ^^^ 680 PLOT 6,4 : PLOT 2, 22, 22, 242, 22, 70, 46, 70, 46, 22, 22,-2,-... 632 REM PLOT 5 635 PLOT 6,7 148

690 PLOT 2,2S,2S,242,40,23,40,4A2=;5 735 REM PLOT 3 740 PLOT 6,3 : PLOT 2, 2S, 28, 242, 40, 23, 40, 46, 2S, 4^., 40, 4/-.,-ao,/-.4. 2'=' ,64,255 750 FOR 1=1 TO 570 : NEXT I : PLOT 6,0 760 PLOT 2, 23, 23, 242, 40, 23, 40, 46, 23, 46, 40, 4/-., 40, A,4, 2P ^ A4, 2=:'=^ 762 PLOT REM PLOT 1 310 PLOT 6,1 : PLOT 2,40,23,242,40,64,255 320 FOR 1=1 TO 570 : NEXT I : PLOT 12 350 GOTO 3000 1000 PLOT 12 : PLOT 6,1 1020 PRINT "XYPLOT" : PRINT 1050 PRINT "ENTER THE NUMBER OF THE KIND F PLOT" 1060 PRINT "YOU WANT MAKE. " : E 0<::N-::Í02^, M= 123,256,512 R 1024." 1150 PRINT : INPUT MODE 1200 PLOT 12 1220 PLOT 6,3 1240 IF M0DE=1 THEN 1300 1250 IF M0DE=2 THEN 1400 1260 INPUT "IS YOUR DATA STORED BY COLUMNS (Y/N) " " : Arr í 1270 IF ANS*="N" THEN 1230 1275 GOTO 50 1230 PRINT "WELL, D IT THENî" 1290 GOTO 10000: PRINT "XL(1),YL(1),XY(1),YH(1),TRANS(1; . XL ( 2 ) . . . " 1420 PRINT : INPUT "(Y/N)";ANS* 1450 GOTO 1270 3000 REM THIS SECTION SENDS DATA TO INTERFACE 3130 PLOT 6,4 3140 REM DF 13 THE DISK FILE RAM USES LINES :::40O-3640 3420 XH=DA(J) 3430 YH=DA(J+1) 3440 OUT 239,XH : OUT 253,YH 3450 1=1+2 : J=J+2 3460 IF J::-4096 THEN 3000 3500 REM SAM INTERFACE USES JUST THIS PORTI N 3520 TRANS=DA(J) 3150 GOTO 3220 3200 DIM DA(4096) 3210 IF DF=1 THEN 9200 3220 IF DF=2 THEN 9220 3240 IF DF=3 THEN 9240 3260 IF DF=4 THEN 9260 3230 IF DF=5 THEN 9230 3300 IF DF=6 ^HEN 9300 3320AD "DATA2.ARY" 9230 GOTO 3200 9240 LOAD "DATA3.ARY" 9250 GOTO 3200 149

9260 LOAD "DATA4.ARY" 9270 GOTO 3200 9230 LOAD "DATA5.ARY" 9290 G TO 3200 9300 LOAD "DATA6.ARY" 9310 GOTO :I:200 9320 LOAD "DATA7.ARY" 9330 GOTO :3200 9340 LOAD "DATAS.ARY" 9316.ARY" 9510 GOTO 3200 10000 PLOT 6,2 : END 150

10 REM PROGRAM IDPLOT, 1 DIM PLOTTING OPERATING SYSTEM 20 PLOT 12 : REM CLEAR SCREEN :30 PLOT 6,6 : PLOT 14 : REM SET LARGE CHARACTOPS, FG TO BLUEC-PE EN 40 PRINT "WELCOME TO " : PLOT 3,12,0 : PLOT 6,3 : PRINT "IDPLC^" 50 PLOT 3,19,0 55 PLOT 6,4 60 PRINT "—A ONE DIMENSIONAL PLOTTING ROUTINE" 65 PRINT : PLOT 6,2 66 PLOT 15 70 PRINT "DO YOU NEED INSTRUCTIONS? " : PLOT 6,7 : PLOT 3,27,5 30 PRINT "(PRELOTTING RO UTINE" 140 PLOT 3,0,4 : PRINT "IN THIS CONFIGURATION THE " 150 PLOT 3,26,4 : PLOT 6,1 PRINT "LASER PLOTTER " 160 PLOT 3,40,4 : PLOT 6,2 PRINT "FUNCOT 6,2 : PRINT "SPECIFIED 230 PLOT 3,41,3 : PLOT 6,3 PRINT "DATA SET." 240 PLOT 6,2 : PRINT "A " : PLOT 3,2,10 : PLOT 6,1 : PRINT "«=01^ T " 250 PLOT 3,8,10 : PLOT 6,2 : PRINT "IS DEFINED BY THE FOLLOWING '• 260 PLOT 3,36,10 : PLOT 6,4 : PRINT "TWO QUANTITIES:" 270 PLOT 6,1 024" 360 PLOT 3,15,20 : PLOT 6,1 : PRINT "DATA POINTS " :370 PLOT 3,27,20 : PLOT 6,2 : PRINT "CAN BE PLOTTED. " 420 PLOT 15 : PRINT : PRINT "TO CONTINUE, PRESS PETURN." 430 PLÛT 6,0 : INPUT X : PLOT 6,2 440 PLOT 14 : REM SET BIG LETTERS 12,7 : PLOT 6,2 : PRINT " M" 520 PLOT 3,13,3 : PRINT "." : PLOT 3,13,9 : PRINT "." : PLCT 3,1 3, 10 : PRINT "." 530 PLOT 3,13,12 : PRINT "." : PLOT 3,13,13 : PRINT ".". 540 PLOT 3,13,15 : PRINT "1" : PLOT 3,13,16 : PRINT "0" 550 PLOT 3,5,11 : PLOT 6,7 : PRINT : PRINT "PRESS RETURN TO COr"' T 640 PLOT 6,0 : INPUT X : PLOT 6,2 650 PLOT 12 : REM CLEAR SCREEN 660 PLOT 6,3 : PRINT "F( X ) " 670 PL T 3,7,0 : PLOT 6,2 : PRINT "13 THE VALUE CF " 630 PLOT 3,23,0 : PLOT 6,5 : PRINT "YOUR DATA " 690 PLOT 3,33,0 : PLOT 6,2 : PRINT "AT THE POINT" 70U WILL BE" 760 PLOT 3,0,4 : PRINT "ASKED TO " 77730 PLOT 3,9,3,17,4 4 : PLOPLOT T 6,6,6 2 :: PRIN PRINTT "PROVID"THE "E " 790 PLOT 3,21,4 PLOT 6,1 : PRINT "MAXIMUM VALUE " 300 PLOT 3,35,4 PLOT 6,2 : PRINT "ATTAINED BY " ;^10 PLHT 3,47,9,8 : PLOT 6,2 : PRINT "CAN BE " 390 PLOT 3,16,3 : PLOT 6,5 : PRINT "NORMALIZED." 151

iU6U KLUI 3i^f-,'z'iJ < PLOT 6,7 : PRINT "TO CONTINUE, PRESS RETURN." 1070 PLOT 3,35,:30 PLOT 6,0 INPUT X : "VALUES " 1500 PLOT 3,36,2 PLOT 6,2 : PRINT "OF " 1510 PLOT 3,:39,2 PLOT 6,3 ' PRINT "F( X )" 1520 PLOT 3,46,2 PLOT 6,2 : PRINT "ARE STORED" 1530 PLOT 3,6,4 : PRINT "ON YOUR DATA DISK. AN N POINT 1550 GTH " 1600 PLOT 3,23,3 PLOT 6,4 PRINT "N." 1610 PLOT 3,0,12 PLOT 6,1 PRINT "EXAMPLE...THE 3 POINT DATA SET F:" 1-S15 PLOT 3,:35, 12 PRINT "WOULD BE STORED AS:" 1620 PLOT 3,16,14 PLOT 6,3 : PRINT "0 1 2" 1630 PLOT 3,12,14 PRINT "F = 1750 PLOT 3,:35,25 PLOT 6,1 : PRINT "PRE:5S RETURN. " 1760 PLOT 3,0,27 PLOT 6,2 : PRINT "TO BEGIN PLOTTING, " 1770 PLOT 3,19,27 PLOT 6,5 : PRINT "PRE:3S P, THEN RETURN. " 1730 INPUT X$ 1790 IF X$="P" GOTO 2000 1:300 LOAD "MENU2.BAS" : RUN 2000 LOADLI: T 1790

1790 IF X$="P" GOTO 2000 1300 LOAD "MENU2.BAS" : RUN 2000 LOAD "1DPLT2.BAS" : RUN 5000 PLOT 6,2 : PLOT 15 152

10 REM PROGRAM 1DPLT2 20 REM THIS PROGRAM DOES THE ACTUAL PLOTTINn 30 PLOT 12 : REM CLEAR SCREEN 40 PLOT 14,6,3 : REM SET BIG LETTERS AND FG=YELLnW 50 PLOT 3,5,0 : PRINT "IDPLOT" 60 PLOT 15 : REM SET LITTLE CHARACTERS 70 PLOT 6,1 : PRINT : PRINT "THIS PROGRAM WILL PLOT A ONE-DIMEN SIONAL" 75 PRINT : PRINT "FUNCTION. THE DATA WILL BE PLOTTED ALONG THE :30 PRINT : PRINT "X AXIS. HOW MANY POHE" 90 PRINT : PRINT. "PLOT.)" : INPUT Y 92 IF Y::-1024 THEN 96 9:3 GOTO 100 96 PLOT 12 97 PRINT "THIS NUMBER MUST BE LESS THAN 1025.. TRY AGAIN'NT(XL/4) 170 REM BE SURE THAT YOUR XL 13 A POWER OF 2! 1:30 Y=INT(Y/4) : REM SAME GOES FOR Y! 270 PLOT 12 : REM CLEAR SCREEN 335 PLOT 12 : PLOT 14 345 PLOT 3,5,26 : PLOT 6,7 PRINT "REMORE-EXPOSURE 370 PLOT 3,20,0 : PLOT 6,1 PRINT "CHECKLIST" 330 PLOT 15 :390 PLOT 3,10,4 : PLOT 6,7 PRINT "PRESS WHEN EACH STEP HAS BEEN COMPLETED." 400 PLOT 3,16,4 : PLOT 6,5 PRINT "RETURN" 410 PLOT 3,10,3 PLOT 6,1 : PRINT "FILM IN CAMERA, CAMERA W0U6.0 490 PLOT 3,10,12 PLOT 6,2 PRINT "DOOR CLCSED." 500 PLOT 3,10,14 PLOT 6,1 PRINT "LASER WARNING LIGHT 0N-~" 510 PLOT 3,60,14 PLOT 6,0 INPUT X 520 PLOT 3,10,14 PLOT 6,2 PRINT "LASER WARNING LIGHT N." 530 PLOT 3,10,16 PLOT 6,1 PRINT "LAOPERLY ALIGNED'" 600 PLOT 3,60,20 PLOT 6,0 INPUT X 610 PLOT 3,10,20 PLOT 6,2 PRINT ":3HUTTER PRÛPERLY ALICNED. " 620 PLOT 3,10,22 PLOT 6,1 PRINT "ALL LIGHTS FF"'" 630 PLOT 3,60,22 PLOT 6,0 ÎNPUT X o PRINT "SECONDS BEFORE EXPOSURE SEQUE NCE BEGINS:" 671 PLOT 15 : PLOT 3,:32,10 : PLOT 6,3 : PRINT "GET READY ^0 PEN THE SHUTTER" 675 REM PLOT SQUARE Ô80PED IT66S4 : PLOT 2, 22, 22, 242, 22, 70, 46, 70, 46, 22, 22, 22^ 2T^ 703 REM PLOT 4 710 PLOT 2, 28, 64, 242, 23, 46, 40, 46, 40, 64, 40 ^ ^"r:, 255 720 FOR 1=1 TO 570 : NEXT I 730 PLOT 6,0 : PLOT 2, 23, 64, 242, 23, 46, 40, 46, 40 ^ 64> 40, 23 , -.Tf 735 770 REM PLOT 2 15:

780 PLOT 6,2 : PLOT 2,40,23,242,23,23,23,46,40,46,40,64,23,64,25 785 FOR 1=1 TO 570 : NEXT I 790 PLOT 6,0 : PLOT 2,40,28,242,28,23,28,46,40,46,40,64,23,64,25 5 800 REM PLOT 1 810 PLOT 6,1 : PLOT 2,40,28,242,40,64,255 820 FOR 1=1 TO 570 : NEXT I : PLOT 12 1990 GOTO 3000 2000 DIM DA(1024) 2001 PLOT 12 2003 PLOT 14 : PLOT 6,65 2005 PLOT 3,26,16 : PRINT "LOADING DATA" 2010 LOAD "DATAl.ARY" 2030 XSCALE=TH MODES 3030 OUT 239,PX 3040 OUT 253,I 3050 IF M0DE=1 THEN 3060 3051 REM THESE 5 LINE3 ARE USED IN EXTENDED MODE 3052 FOR W=0 TO 3 3053 FOR G=0 TO 3 3054 OUT 254,W : OUT 251,G : OUT 247,TRANS 3055 NEXT G,W 3060 OUT 247,TRANS 3061 NEXT I 3065 PLOT 12 : PRINT PX : PLOT 12 3070 NEXT J 3900 OUT 239,0 : OUT 253,0 3950 IF (X*="Y") GOTO 4000 3999 GOTO 5000 4000 LOAD "LSPELL" : RUN 5000 PLOT 15,6,2 READY 154

10 REM PROGRAM HOLO, HOLOGRAM PLOTTING SYSTEM 20 PLOT 12 : REM CLEAR SCREEN 30 PLOT 6,6 : PLOT 14 : REM :3ET LARGE CHARACTORS, FG TH BLUEGRE EN 40 PRINT "WELCOME TO " : PLOT 3,12,0 : PLOT 6,3 : PRINT "HOLO" 50 PLOT 3,19,0 : PLOT 6,2 55 PLOT 6,4 60 PRINT "—THE HOLOGRAM PLOTTING ROUTINE" 65 PRINT : PLOT 6,2 66 PLCT 15 70 PRINT "DO YOU NEED INSTRUCTIONS? " : PL T 6,7 : PLOT 3,27,5 :30 PRINT "TTING ROUTINE. " 140 PLOT 3,0,4 : PRINT "IN THIS CONFIGURATION T^JE " 150 PLOT 3,26,4 : PLOT 6,1 : PRINT "LASER PLOT"^ER " 160 PLOT 3,40,4 : PLOT 6,2 : PRINT "FUNCTIONS A "POINT " 220 PLOT 3,23,3 : PLOT é-, 2 : PRINT "SPECIFIED BY YOUR " 230 PLOT 3,41,8 : PLOT 6,3 : PRINT "DATA SET." 240 PLOT 6,2 : PRINT "A " : PLOT 3,2,10 : PLOT 6,1 : PRINT "P IN T " 250 PLOT 3,3,10 : PLOT 6,2 : PRINT "13 DEFINED BY THE FOLLOWING 260 PLOT 3,HERE ' 310 PLOT 3,6,18 : PLOT 6,3 I PRINT "F(X,Y) " 320 PLOT 3,14,13 PLOT 6,2 PRINT "IS THE VALUE CF THE DATA AT THE " :330 PLOT 3,47, 18 PLOT 6,1 PRINT "POINT 340 PLOT 3,53,13 PLOT 6,2 PRINT "X,Y." ••>c?5: 0 PRINT "OVER A MILLIO(X,Y) " 670 PLOT 3,7,0 : PLOT 6,2 : PRINT "IS THE VALUE OF 630 PLOT 3,23,0 PLOT 6,5 PRINT "YOUR DATA " 690 PLOT 3,33,0 PLOT 6,2 PRINT "AT THE POINT" 700 PLOT 3,46,0 PLOT 6,1 PRINT "X,Y" 710 PLOT 3,49,0 PLOT 6,2 PRINT ", AND" 720 PLOT 3,0,2 : PRINT "PROVIDE 730 PLOT 3,17,4 PLOT 6,2 PRINT "THE " 790 PLOT 3,21,4 PLOT 6,1 PRINT "MAXIMUM VALUE 300 PLOT 3,35,4 PLOT 6,2 PRINT "ATTAINED BY " 310 PLOT 3,47,4 PLOT 6,3 PRINT "F(X,Y)" :520 PLOT 3,0,6 : PLOT 6,2 I "NORMALIZED." :385 PLOT 15 PLOT 6,2 : PRINT "EXAMPLE..." :390 PLOT 3,5, 10 900 PLOT 3,5,12 PRINT "SUPPOSE THAT YOU WANT TO PLOT THE F LLÛ WING FUNCTION: •• PLOT 6,3 : PRINT "F(X,Y) = n250»SINC(X+Y)n 910 PLOT 3,10,14 PLOT 6,2 : PRINT "IN THE REGION " •^:-:9200 PLOPLOTTET 3,5,1R RESOLUTION6 " 1000 PLOT 3,5,22 : PRINT "IF YOU USE THIS FUNCTION:" 155

1010 PLOT 3,10,24 : PLOT 6,3 : PRINT "F(X,Y) = n250*SINCC (X^Y)/1

1020 PLOT 3,40,24 : PLOT 6,6 : PRINT ", 0 <' X,Y <' 100 " 10:30 PLOT 3,5,26 : PLOT 6,2 : PRINT "NHW •• ^ 1040 PLOT 6,0 : INPUT X : PLOT 6,-:> 1080 PLOT 12 1090 PLOT 27,4 1100 PRINT "LOAD EXAM.DSP" 1110 PLOT 27,27 1120 PLOT 3,15,30 : PLOT 6,4 : PRINT "TO C0N,2P,2 : PLOT A, 1 : 1500 PLOT 3', 36,2 : PLOT 6,2 : PRINT "OF " f-UL i 6, i . 1510 PLOT 3,39,2 : PLOT 6,3 : PRINT "F(X,Y) " !^on o!"n VV"^ '' ^^^^ ^'- '' ^^^^^ "^^^ 3,6 : PLOT 6,7 : PRINT 1..90 PLOT 3,6,8 : PLOT 6,2 : PRINT "WHICH HAS LENGTH " 1600 PLOT 3,23,3 : PLOT 6,4 : PRINT "N X M. " 1602 PLOT 6,1 : PLOT 3,30,3 1604 PRINT "(NORMALLY FOR CGH^S, N = 3»M.)" 1610 PLOT 3,0,12 : PLOT 6,1 : PRINT "EXAMPLE. . . THE 2 X -^ DATA 3£ T F: WOULO PLOT 3,40,19 : PRINT "SAF(6) = 6" 1710 PLOT 3,0,23 : PLOT 6,2 : PRINT "THIS COMPLETES THE DE:-CRIPT lON OF " • - • 1720 PLOT 3,34,23 : PLOT 6,7 : PRI.NT "HOLO. " 1730 PLOT 3,0,23 : PLOT 6,2 : PRINT »»^0 RETURN TO THE " 1740 PLOT 3,17,25 : PLOT 6,3 : PRINT "OPERATING 3YSTEM, " 1750 PLOT 3,35,25 40 PL T 6,1 : PLOT 3,19,0 : PRINT "HOLOGRAM:=:1« " :3060 PLOT 15 : PLOT 6,3 :3070 PLOT 3,5,6 : PRINT "IN HOLOGRAPHY, WE SUPERIMPOSE A 3080 PLOT 6,4 : PLOT 3,37,6 : PRINT "SPATIAL FREQUENCY' 3090 PLOT 6,3 : PLOT 3,5,3 : PRINT "MAP ON THE FILfl PLANE, AS SH WN: " 3100 PLOT 2,46,39,242,46,72,79,72,79,39,4 3175 PLOT 2,46,:39,255 3130 PLOT 6,1 : PLOT 3,5,26 : PRINT "THE FILM PLANE IS DIVIDED I NTO A GRID OF NXN :5QUARE CELLS. " 3190 PLOT 3,5,23 : PRINT "EACH CELL REPRESENTS A DISCRETE SPATIA L FREQUENCY PAIR.: PLOT 6,2 3330 PRINT "IN ORDER TO REPRESENT BOTH AMPLITUDE AND PHASE" 3340 PLOT 3,5,3 : ^^1^7^"^^ EACH DISCRETE FREQUENCY, WE DIVIDE E ACH CELL" 3350 PLOT 3,5,10 : PRIN: PRINT "B" 3460 PLOT 3,15,14 : PRINT ."C" 3500 PLOT 6,3 : PLOT 3,22,14 3510 PRINT "WE CAN REPRESENT ANY COMPLEX" 3520 PLOT 3,22,16 : PRINT "FUNCTION AS LIST 3560 3560 PLOT 3,5,25 : PRINT "WE CAN REPRESENT THIS FUNCTION AS THRE E :3PACIALLY DELAYED " 3570 PLOT 3,5,27 : PRINT "REAL FUNCTIONS A,B AND C. " 156

; 580 PLOT 6>7 : PLOT •3,31,27 : PRINT "IHU3 EACH CELL IN A CCH IS II 3590 PLOT 3,5,29 : PRINT "MADE UP OF THREE RECTANGULAR :3UBCELLS, OR PIXELS." 3600 PLOT 3,5,31 : PLOT 6,1 : PRINT "(PRESS RETURN TO CONTINUE. " 3610 PLOT 3,0,9 : PLOT 6,0 : INPUT X : PLLIST 3600 :3600 PLOT 3,5,31 : PLOT 6,1 : PRINT "(PRESS RETURN TO CONTINUE. " :3610 PLOT 3,0,9 : PLOT 6,0 : INPUT X : PLOT 6,2 4999 GOTO 650 157

10 REM PROGRAM H0L02 20 REM THIS PROGRAM DOES THE ACTl lAL PLOT-^ING :5 OUT 253,0 : REM CLEAR THE INTERFACE 10 PLOT 12 : REM CLEAR SCREEN 402 PLODF=1T 14,6,3 : REM :3ET BIG LETTERS AND FG=YELLOTc^L.uWw 45 GOTO 1000 30 PLOT 12 60 PLOT 15 70 PLOT 3,5,4 : PLOT 6,2 : PRINT "HOW MANY POINTS DO Yrn l WANT TO PLOT ALONG THE X-AXI:3?" :30 INPUT N : IF N<1025 THEN 90 :32 PLOT 6,7 : PRINT "THIS NUMBER CANNOT EXCEED 1024, TRY AGAIN " :56 GOTO 30 •50 PL42, 32, 96, 96, 96, 96, 32, 32, 32,255 140 PLOT 3,16,25 PLOT 6,2 : PRINT "0 1 2 ..." 150 PLOT 3,45,25 PRINT N 160 PLOT 3,23,27 PRINT "X-AXIS" 170 PLOT 3,14,23 PLOT 6,3 : PRINT "0" 130 PLOT 3,14,21 PRINT "1" 190 PLOT 3,14,19 RIVE. " PRINT 3,5,28 : PLOT 6r4 : PRINT "YOUR DATA DISK 347 PLOT 3,5,30 : PLOT 6,2 : PRINT "PRESS RETURN TO CONTINUE. " 343 PLOT 3,60,30 : PLOT 6,0 : INPUT X 349 GOTO 8200 350 PLOT 12 : PLOT 14,6,4 355 REM DATA LOADED," 410 PLOT 3,10,3 : PLOT 6,1 : PRINT "FILM IN CAMERA, CAMERA WOUND 420 PLOT 3,60,10 : PLOT 6,0 INPUT X 430 PLOT 3,10,3 : PLOT 6,2 : PRINT "FILM IN CAMERA, CAMERA WOUND 440 PLOT 3,HT ON?" 510 PLOT 3,60,14 PLOT 6,0 INPUT X 520 PLOT 3,10,14 PLOT 6,2 PRINT "LASER WARNING LIGHT ON." 530 PLOT 3,10,16 PLOT 6,1 PRINT "LASER ON?" 340 PLOT 3,60,16 PLOT 6,0 INPUT X 550 PLOT 3,10,16 PLOT 6,2 PRINT "LASERl : PRINT "ALL LIGHTS OFF 630 PLOT 3,60,22 PLOT 6,0 INPUT X 640 PLOT 3,10,22 PLOT 6,2 PRINT "ALL LIGHTS OFF." 645 PLOT 6,67 650 PLOT 3,10,28 PRINT "PRESS RETURN WHEN YOU ARE READY TO BEG IN." 660 PLOT 3,60,28 : PLOT 6,0 : INPUT X : PLOT 6,2 670 PLOT 12 : PLOT 14,6,11 TO 570 : NEXT I : REM ONE :3EC0ND DELAY 705 PLOT 6,0 : PLOT 2,28,28,242,40,23,40,46,23,46,23,64,40,64,25 158

706 PLOT 6,5 708 REM PLOT 4 710 PLOT 2,28,64,242,28,46,40,46,40,64,28,64,255 762 PLOT 3,32,10 : PRINT " M 765 PLOT 14 : PLOT 6,71 : PLOT 3,40,16 : PRINT "npEN :=;Hf!TTER" 770 REM PLOT 2 780 PLOT 6,2 : PLOT 2,40,2850 GOTO 3000 1000 PLOT 12 1010 PLOT 6,3 1050 PRINT "H0L02 USES SEQUENTIAL ACCESS MODE ONLY" 1260 INPUT "13 YOUR DATA STORED BY COLUMNS (Y/N)?";ANS$ 1270 IF ANS*="N" THEN 1280 1275 GOTO 50 1280 PRINT "WELL, DO IT THEN!" IF IMMAX THEN 10000 3600 J=J+1 3620 IF J>4096 THEN 8000 3640 GOTO 3520 3000 REM DATA IS LOADED HERE 8020 REM DIMENSION STATEMNENT HERE :3050 DF=DF+1 3070 PLOT 6,7 : PRINT "LOADING DATA"îDF;". ARY" 3100 REM DFEN 9380 3400 IF DF=11 THEN 9400 3420 IF DF=12 THEN 9420 S440 IF DF=13 THEN 9440 ;3460 IF DF=14 THEN 9460 :34:50 IF DF=15 THEN 9480 3500 IF DF=16 THEN 9500 8600 GOTO 10000 '"'200 LOAD "DATAl.ARY" 9210 GOTO 350 9220 LOAD "DATA2.ARY" 9410 GOTO 3200 9420 LOAD "DATA12.ARY" 9430 GOTO 3200 9440 LOAD "DATA13.ARY" 9450 GOTO 3200 9460 LOAD "DATA14.ARY" 9470 GOTO 3200 94:30 LOAD "DATA15.ARY" 9490 GOTO 3200 9500 LOAD "DATA16.ARY" 9510 GOTO 3200 10000 PLOT 6,2 159

10 REM PROGRAM TRANSFER 15 PLOT 12 : REM CLEAP SCREEN 23 PRINT "REMOVE 1>'£ SYSTEM DISK AND INSERT Y UR DATA DISK." 25 PRINT 20 PRINT "ENTER THE NUMBER OF DATA POINTS (MAX 4096)" 32 INPUT "THAT YOU WANT TO TRANSFER."?NPTS 34 PRINT :35 PRINT "ENTER ^N-" FOR NORMAL RE:30LUTI N (64 GRAY LEVELS)." 37 INPUT "OR ^E'" FOR EXTENDED MODE (256 GRAY LEVELS).";V^ ^O IF V$="E" THEN 3000 *2 PLOT 12 : REM CLEAR SCREEN 45 PLOT 14 : REM SETS POKE 33265,T 100 WAIT 0,123,255 120 X=INP(0) 130 N=X-160 140 IF V*="N" THEN :300 150 REM GET SECOND VALUE 160 T=PEEK(:33265) 170 PLOT 27, 13 130 PLOT 49,13 190 POKE :33265,T 200 WAIT 0,123,255 2V:}_ X = INP(0) _ \:20 M=X-160 2-!0 D(I) = 16-*N+M Z'z^O GOTO :350 :-00 D ( I ) =N 350 NEXT I 1000 REM TURN THE VAX PROGRAM OFF 1020 "^=PEE^-: ( 33265) 1040 PLOT 27,13 1060 PLOT 50,13 IC-SO ^'OKE 33265, T 2030 PLOT 12 20^0 PLOT 15 2044 D(0)=NPTS 2045 SAVE "D.ARY" 2100 PRINT "DONE" 2200 END 3000 PRINT : PRINT : PLOT 6,1 3100 PRINT "SPECIALISPRINT T: PLO300T0 6,1

.:,45(-, iNPUT "P9ESS RETURN TO BEGIN";Z ":p;oo GOT 70