A Set of Device-Indepedent First Level Graphics Routines

Nancy A Storch

Lawrence Livermore Laboratory

1974

AEC New York May 1974

ABSTRACT

This paper describes TV80, a set of graphics routines used as a language to plot points, lines and characters by Fortran applications programs. It is a device-independent version of a set of routines long used at Lawrence Livermore Laboratory. Whereas the old routines were limited to one device, TV80 allows access to a number of devices through independent software processors. Features include scaling, clipping, scan conversion and character generation for raster devices, identification of output, handling of on-line display hardware, and generation of display commands.

BACKGROUND

Since 1964, the major portion of the computer graphics produced by scientific programs at Lawrence Livermore Laboratory has been done with a single set of Fortran subroutines. These were originally designed to generate display code for two Data Display Inc. high speed CRT's, called DD80's [1][3]. The CRT's image was recorded on 35mm film. The major use of the film was to obtain hard copies from the Xerox Copyflo. Some of it was used for movies. One DD80 was driven by a batch system IBM 7094 and the other by a time-shared CDC 6600. The Fortran subroutines were used to produce graphs, contours, three-dimensional isoplots, histograms, flowcharts and reports. Although they were simple routines which accepted data in the user's coordinate system, drew a grid, and plotted series of lines, points or characters, they were versatile enough for most user's needs. Files containing DD80 drawing commands were put on tapes and later plotted at certain times of the day by the operating system. This mode of operation is still in use with output being plotted on either a DD80 or an Information International Inc. FR80.

During the past ten years, our entire work environment has changed considerably and will probably continue to do so at an even faster pace. Most of the Laboratory's work is still done hy large hydrodynamic codes which are written primarily in Fortran or assembly languages for faster program execution. A1though numeric output continues to be standard procedure, most users want graphical output. Thus we face new demands for interactive graphics editors, color movie capabilities, shaded-tone pictures and command languages for specific graphic applications. Today we have twice as many users (approximately 1500), and our compute power is twenty-one times as great. We operate in an elaborate system of networks and computers to support time-sharing in which most users have both a teletypewriter and a television monitor in their office (which they use in combination as an interactive terminal), and a nearby remote job entry/exit terminal. A number of different graphics output devices are also available, some more recently acquired, some have been around a while; among these is an upgraded DD8O with color, grey level and raster capabilities. Figure 1 shows the different graphics choices available to a code running in one of our network host computers, a CDC 7600.

When raster devices were acquired, programs were written which scan converted previously made DD80 files [3][4]. The FR80 was made to simulate the DD80 and accepted D80 tapes. We did not have the capahility to use features of the FR80 which were not compatible with the DD80; these included a larger address space, control over intensity, spot size, character size, character rotation and arc drawing. Also a number of routines similar to the DD80 routines but different, had come about to produce plotting tapes for CalComp and Gerber plotters [5][6]; these forced users desiring a choice of outputs to include repetitious coding for each plotting package.

TV80 DEVELOPED

Therefore to satisfy the users requirement of easily using different devices in a like manner, and to more fully utilize the capabilities of the devices, we produced a totally new set of device-independent routines, called TV80 [7]. These routines could easily be integrated into existing codes because TV80 would contain a subset of routines which were identical in name and argument list to the old routines. TV80 would also serve as a foundation for higher level graphics packages being developed simultaneously [8][9]. In general, TV80 routines are not only as fast as the routines they are intended to replace but also they are easy to maintain and modify and can be expanded to control additional devices. TV80 consists of (1) device-independent routines that define display windows, establish mappings, draw lines, characters and points, and (2) software processors for different graphics output devices and data formats. TV80 can also be used to make a general-purpose picture description file.

HOW TV80 WORKS

Figure 2 and Figure 3 show the relationship of TV80 to the user's code and graphics devices. A processor is initialized when a call is made from the user's program to a special ID routine, e.g. DDSOID. (The inclusion of this call in a program causes the entire DD80 processor to be loaded with the user's code from a graphics lihrary). If the initialization process for this device was successful, the processor sets its status to active and stores pointers to itself in the jump table used by TVSWCH, a routine in TV80. Initialization for an offline device includes creating output files and constructing an identification page which contains the time, date, machine, security labeling and distribution of hardcopy or film. Online devices are reserved by the ID routine for the current user by sending a request to either a remote system or the host operating system. For classified data, a procedure is followed whereby the system verifies that the user is at a certain monitor by having the user type in a code which has been displayed on the monitor. Processors also create temporary working files. Error recovery techniques are used depending on the output device selected.

Except for initialization, release, and special device or data base features, the running of the separate processors is controlled by the routine TVSWCHI. The value of a specified task identification number is used by TVSWCH as an index into a jump table which locates those portions of each processor which handle the designated task. Tasks currently being used are: position, draw points, draw lines between pairs of points, draw lines connecting points, draw characters, output picture or buffer, and advance frame. Most of these tasks have their counterparts in the device-independent section of TV80. Individual processors are called in turn to handle the task and when finished to return control to TVSWCH. Those process are not currcntly active are skipped. No intermediate data base is constructed. Integer arrays of coordinate values are passed in common blocks. Thc arrays have already been scaled and clipped by TV80's device-independent routines. Character strings and information about size, orientation and intensity are also passed in common blocks.

While a code is running, a call to GSTAT, a device-independent routine in TV80, may change the status of a particular processor from active to inactive or disconnected; or from inactive to active or disconnected. Once disconnected, a processor can only be activated again by a call to its initialization routine. Disconnection severs all program ties with that processor's device and/or data files. At that time files may be given to the operating system for later plotting or printing. Inactive status is useful when you w1sh only to temporarily turn off output to some processor.

Although almost any number of device processors may be active at a time, users are generally limited in that the choice of where pictures are to be displayed or printed must be made before the picture is generated. An exception is a hardcopy feature which will send a television bit buffer after it has been viewed to a raster printer. We are currently working on a processor to make a general-purpose picture description file. This will make possible the saving of a device-independent representation for later use by either movie or text editors, at which time the decision may be made to obtain hardcopy from some device.

TV80 is flexible because program coordinate data may be floating-point variables in a program-defined coordinate system or they may be integers on an imaginary square display recognizable by TV80. In the latter case, all clipping and transformation operations arc bypassed when the data is sent to the processors. The program may turn clipping on or off. Although each processor has its own buffers, these can be reassigned by the user's program. Depending upon the program, more than one processor may he made to use the same buffer; or buffers may be dynamically allocated and deallocated. A program can increase the size of a processor's data file when necessary.

CONCLUSION

A situation existed where we found we had many different types of graphics devices supported by different software. To better utilize what we had, we developed a package of routines similar to those already in use with the. flexibility of having independent software processors. We are continuing our work on TV80.

REFERENCES

[1] Cecil A, Michael, G, DD80Programmer's Manual, Lawrence Livermore Laboratory, Rept. N 2.8-002 (1964).

[2] Ford J, Welsh, M, CRT Plotting Routines in Use at LRL-Livermore, Lawrence Livermore Laboratory, UCRL-14427-T (1965).

[3] Keller P, DDTV - to selectively scan frames of DD80 files via TMDS, Lawrence Livermore Laboratory, HR-412 (1971).

[4] Storch N, Fuss, D, New Routines PCNTLR and DCNTLR on G-Machine for Quick Hardcopy of Printer and DD80 Files, Lawrence Livermore Laboratory, Octopus Communique-605 (1973).

[5] Michael G, Van Heweker H, Hunt C, Use of CalComp P1otters, Lawrence Livermore Laboratory, UCRL-14834. (1966).

[6] Schwarz P, A New Gerber Package for the 6600, Lawrence Livermore Laboratory (1970).

[7] Storch N, TV80: Device-Independent Graphics Routines for the CDC 7600 Computer, Lawrence Livermore Laboratory. Working Paper UCLR-748 (1974).

[8] Archuleta M, Hidden Surface Processing Lawrence Livermore Laboratory, UCID-30057 (1973).

[9] Archuleta M, Interactive Surface Plotting, Lawrence Livermore Laboratory, UCID-30058 (1973).

File Storage PDP-10 Other Host Computers Evans & Sutherland LDS-1 PDP/11 DD80 User's Code in Host Computer (CDC 7600) PDP/11's PDP/8's 20 Remote Printers PDP/8's PDP/11 600 Teletype- writers 96-channel Television System DD80 FR80 Calcomp Plotters Gerber Plotters Fast Raster Printers (with hardware scan converter) Tape
Figure 1: Graphics devices available to user's code.
User's code Mathematical model of problem Routines to manipulate data bases User Command interpreter Library routines To initialize DD80 processor To initialize other processors Change device status GSTAT DD80 processor Device Processors Device-independent routines Set parameters Clip Transforme to TV80 coordinate system TVSWCH to graphics devices
Figure 2: Relationship of TV80 to the user's code and graphics devices.
User's code GSTAT TVSWCH Disconnect DD80 or give files to system for later processing DD80ID Connect to DD80 or create output files Task routines I/O routines
Figure 3: The DD80 processor.

More Computer Animation Papers 1964-1976