NCAR/TN-174+IA NCAR TECHNICAL NOTE ------l------I-----.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ June 1981
Selected User Reference Papers
Editor: Gregory R. McArthur
SCIENTIFIC COMPUTING DIVISION NATIONAL CENTER FOR ATMOSPHERIC RESEARCH BOULDER, COLORADO Preface
This slim volume represents an amalgam of different user experiences with the NCAR Graphics System. Each of the papers presented herein contains some spe- cial application or use of the Graphics System (or its siblings) which may be of interest to other users of the system. Authors (if known) are listed with each of the papers in the Table of Contents. There are no page numbers, per se, as the collection of papers is sufficiently diverse to warrant presenting each of them as separate entities.
We hope the user will find this collection of Selected User Reference Papers helpful in tailoring various aspects of the NCAR Graphics System to your own unique needs. SELECTED USER REFERENCE PAIERS
A Guide to Making Movies at NCAR...... MAKING MOVIES-1 By: Fred Clare and David Kennison
A Portable Device-Independent FORTRAN Graphics System...... GRAPHICS SYSTEM-1 By: Lofton Henderson
Generating and Plotting Graphics Text at NCAR...... GENERATING AND PLOTTING-1 By: Fred Clare 1 PRFILM...... PRFILM- By: David Kennison
Printer Simulation on the Diccmeds ...... l...... PRSIM-1 By: Fred Clare Remote Job Entry Graphics...... RJE GRAPHICS-1 By: Fred Clare
The Metacode Translator MC2DD80B ...... MC2DD80B-1
The Production of Scientific Films Using a Digital Computer and Optical Output Device ...... FILM PRODUCTION-1 By: Thomas Wright
Using Metacode ...... USING METACODE-1
Using the Dicaned Off-line...... DICOMED-1 MAKING MOVIES TITLE A Guide to Making Movies at NCAR
GENERAL (XCENTS 1. This guide is meant to complement the article "The AND SIGESTIOIS Production of Scientific Films Using a Digital Com- puter and Optical Output Device" (also in this manu- al) which is more general in nature. The potential movie-maker should read both articles.
2. After reading this guide, the first thing to do is to talk with the personnel in the film room (room 18), particularly if you are going to make a color movie. They will probably have some good ideas on how to make your movie interesting, appealing, etc. Also, they would like to know what sort of addition- al work load is in store for the film operators, what kind of schedule you have in mind, etc. 3. Remember that almost all movie projectors run at 24 frames per second. This fact should be used in es- timating the time-sequencing in your movie. Getting the action in your movie to look right is not trivi- al, and may take several attempts. 4. NCAR presently has three COM (Computer Output to Mi- crofilm) devices. One is a CDC dd80 cathode ray tube plotter which produces 35mm microfilm. Another is the Dicomed D48 high resolution multipurpose graphic film recorder which produces 35mm or 16mm microfilm. The third is the Dicomed D48 film recorder which produces 105mm microfiche in either 24x or 48x format. The two Dicomed film recorders are presently run completely off-line; metacode is produced on tape and then run on a separate system to produce film. A document describing the usage of the D48's is available in the SCD Documentation Room. Within the next year or two, the D48's will replace the dd80, but right now it is much easier to use the dd80 for any movie work since the dd80 is faster and does not require a separate job submis- sion to process metacode.
5. Create a test strip of 35mm microfilm containing about 300 to 500 frames of your movie. This should be run as a completely standard job, with standard microfilm output on the dd80. Don't forget to specify the appropriate frame limit on your *LIMIT card since the default limit is 100 frames. For reasons described below, this test strip should have a leader and trailer, each consisting of about 50 frames. To prevent the operators from cutting the
MAKING MOVIES - 1 leader and trailer off, these should not be blank frames. A good technique is to put the words "LEADER" and "TRAILER", as appropriate, on each frame, using the largest possible PWRIT letters. This test strip can also be used to get an estimate of the final cost of making your movie.
6. Frequently, one interpolates between data points to create the large number of frames necessary for a movie. If you use linear interpolation to get lots of frames between points (more than 50, say), it can happen that the original data points become notice- able as transitional points in the action of the movie. This problem can usually be solved by using a 1-2-1 smoother on three points, or some more com- plicated scheme.
7. If certain features are common to many or all frames in the movie, you should use the graphics utilities FLASHT, FLASH2, FLASH3, and FLASH4. These routines are described in the "SCD Graphics Utilities" manu- al.
8. Points present difficulties. They may appear very faint. Remedies for this are to draw them several times, or use the graphics routine OPTN to increase the plotter intensity before drawing the points.
9. To familiarize yourself with the graphics software available at NCAR, consult the Library Catalogue in the SCD Consulting Office, and the NCAR Graphics Software Manual.
10. In the film room there is a small projector termed a Movieola with a screen about 5 inches square. This device accepts reels of 35mm film up to 2000 feet in length. Adequate leaders and trailers are necessary if all of the good part of the film is to be viewed (hence the suggestion above for leader and trailer frames in the test strip). Take your test film into the film room and tell them that you would like to view it on the Movieola. The Movieola is automatic, and the film speed can be varied, in a continuous manner, from 16 frames per second to 30 frames per second. You can use this device to view the effects of speeding up or slowing down the action.
11. After viewing the 35mm test run, you may want to ad- just the speed, lettering, etc. 12. Next, if it's not too expensive, you should do a second test. Run the program which will produce the entire movie, but instrument it so that only every
MAKING MOVIES - 2 n-th frame is actually produced. Choose n so that a representative sampling of what's going on is ob- tained (typically an n of 100 works well). Examine this film closely to see if the process being dep- icted behaves as you expect, and that the program is working properly.
13. You will probably want to put titles and explanatory information somewhere in the movie. Text may appear as a fixed frame which remains on the screen for a certain amount of time, or it may be scrolled from the bottom of the frame to the top. As a general rule-of-thumb allow about 2 seconds of movie time (48 frames) for each line of text you expect the viewer to read. It is necessary to have only one frame for a fixed title if you are going to produce a color movie (this frame is photographed and copied), but for a black and white movie, put in enough frames to keep it on the screen the desired amount of time. Also, somewhere in the movie you must give credit to NCAR. This usually takes the form of:
This movie was produced at The National Center for Atmospheric Research Boulder, Colorado
NCAR is sponsored by The National Science Foundation
you want to have nice scroled iit es use the ULIB routine SCROLL (this routine can be costly to run, however). After all the titling and explana- tory materials are in, make a new test strip, or strips, and view the results again.
14. After you are satisfied with the test runs and are sure that everything is as you want it, prepare and submit the final runs. Since movies typically require thousands of frames, it is a good idea not to create the entire movie with one run, since unex- pected errors can be costly. Take advantage of natural breaks (between titles, between different portions of the action, etc.) and create separate, smaller, segments. These can easily be spliced together in the film room. Be sure to specify the appropriate limits on the limit card; e.g., a 10 minute movie will run through 14,400 frames. Before making the final production runs, inform the film room of what you are about to do. They may want to tune the microfilm device for you and make sure there is adequate film in the magazine (a full maga- zine has about 15,000 frames). You should inform
MAKING MOVIES - 3 the operators that you are submitting these jobs so they will not be concerned about the huge number of frames coming out.
15. Make sure that the final version is produced within a day or two since the tuning on the microfilm dev- ices will vary over a period of days; plots produced on a given day do not look exactly like those pro- duced a few days later. This would cause a slight, but noticeable, discontinuity in the final version.
16. You will almost certainly have to put the dd80 "on line". The normal "off-line" mode of operation causes your plotting instructions to be saved in a buffer and automatically flushed to the dd80 at job termination. If too many plotting instructions are issued, this buffer overflows, causing job termina- tion. With the dd80 on-line, instructions are flushed to the dd80 as they are issued. To put the dd80 on line, see: NCAR Computing Facility Notes #39, p7. 17. When you have the completed 35mm film, examine it to check that it is as you want. Currently, the Di- comed 16mm capability is not being used for movie making. To get a final 16mm version, go to the film room and tell them what you want. They will send it out (to Colorado Springs), and it may take from 10 days to two weeks to get the final 16mm version.
18. While not absolutely necessary, it may be a good idea to make a script showing what's in each segment of the movie, how long each segment is, what order they are in, how much gap is left between them, etc. This script can make splicing much easier for both you and the film operators, and it is a good organi- zational tool. For an example of such a script, see the last page of this guide.
MAKING MOVIES - 4 pecial Problems 1. The techniques for making movies on the CRAY-1 are on the CRAY-1 essentially those described above except that there are additional difficulties. There are several de- fault limits on jobs coming back to the CDC 7600 from the CRAY-1: no more than 1000 dd80 frames may be produced; no more than 10 million CRAY-1 words of plotting instructions may be created; no more than 59 seconds of 7600 cpu time may be spent on metacode translation; no more than 36 seconds of 7600 ppu time may be spent on metacode translation. Since the film devices cannot be put "on-line" with the CRAY-1, these limits cause difficulties with produc- ing large quantities of film with a single CRAY-1 run. The metacode-to-dd80O translator (program MC2DD80B on XLIB) can be run with the dd80 on-line. See the write-up of MC2DD80B, available from the SCD Consulting Office.
Using Color 1. Even though we have no in-house color capability (color wheels do exist for the D48's, but we do not have them), color is still possible. The technique is to produce a separate movie for each color desired, making sure that each such movie has exact- ly the same number of frames.
2. Proceed as above, and at the step where we have to send out for the final 16mm movie, we can also specify the color requirements.
3. Color is a little tricky. When two colors merge it frequently happens that white will result. Color can be frustrating and expensive for several rea- sons: it is often difficult to make completely accu- rate predictions of the final outcome; the tur- naround can be up to 2 weeks; enormous quantities of film are required.
4. Check with the film room before starting any film.
MAKING MOVIES - 5 Example of a movie script
MOVIE FOR VLADIMIR ALEKSANDROV
DESCRIPTION OF MOVIE PORTION SECONDS FRAMES COMMENTS - - -_ _ -_ -______
1) TITLE FRAME ...... 8.0 192 (4 lines of text)
2) 1/2-SECOND GAP ...... 5 12 (blank frames)
3) DESCRIPTIVE TEXT ...... 20.0 480 (10 lines of text) 4) 1/2-SECOND GAP ...... 5 12 (blank frames)
5) CREDIT FRAME 1 ...... 8.0 192 (4 lines of text) 6) 1/2-SECOND GAP ...... -5 12 (blank frames)
7) CREDIT FRAME 2 ...... 8.0 192 (4 lines of text) 8) 1/2-SECOND GAP ...... 5 12 (blank frames)
9) CREDIT FRAME 3 ...... 6.0 144 (3 lines of text) 10) 1-SECOND GAP ...... 1.0 24 (blank frames) 11) MOVIE SEGMENTS 1 THROUGH 4 WITH NO GAPS ...... 846.5 20316
12) 1-SECOND GAP ...... 1.0 24 (blank frames)
13) MOVIE SEGMENT 5 ...... 137.5 3300
14) 1-SECOND GAP ...... 1.0 24 (blank frames)
15) END FRAME ...... 2.0 48 (1 line of text)
TOTALS ...... 1041.0 24984
MAKING MOVIES - 6 GRAPHICS SYSTEH
TITLE: A PORTABLE DEVICE-INDEPENDENT FORTRAN GRAPHICS SYSTEM
AUTHOR Lofton Henderson National Center for Atmospheric Research Boulder, Colorado
ABSTRACT Over the last decade, the graphics group at the National Center for Atmospheric Research has developed a portable, device-independent graphics system. Its broad utility comes from extensive capabilities in the areas of au- tomatic graphing, contouring, global map projections, three-dimensional perspective representation of surfaces and solids, vector field representation, high quality typography, and others. While oriented toward passive graphics, the subroutine organization of the system makes it easy to design limited-interaction applications by writing the appropriate interactive drivers for the sub- routines. Device independence is achieved by generation of metacode, a graphics instruction set for an imaginary but very powerful vector graphics device. Metacode is easily translated to drive a wide range of graphics dev- ices. Portability is achieved by utilizing ANSI FORTRAN 66, by isolating inherently nonportable activities into a handful of small routines that the implementor is respon- sible for producing, and by a strong hierarchical organi- zation (which also allows phased implementation of the system). The system has been installed on computers ranging from small PDPs to CRAY-Is, driving graphics displays from low-performance terminals to Dicomed COM devices.
INTRODUCTION The National Center for Atmospheric Research (NCAR) pro- vides facilities and support for fundamental research in disciplines relating to the atmospheric sciences. Under sponsorship of the National Science Foundation, research projects are carried out by scientists resident at NCAR, by university scientists using NCAR facilities, and by cooperative research teams drawing from both groups. The diverse studies carried out with NCAR resources typi- cally involve modeling of atmospheric, oceanographic, and solar phenomena, or large scale collection, analysis, and archiving of physical data, or both. Due to the level of such activities, one of the most heavily-used facilities at NCAR is its Computing Facility. In the environment of a local network to which over 50 remote sites have remote job entry (RJE) access, NCAR provides significant comput- ing power on its CRAY-1 and Control Data mainframes, as well as considerable peripheral services. Graphical out- put to an expanding family of plotting and display dev-
GRAPHICS SYSTEM - 1 ices is perhaps the most heavily used of these peripheral services. Coping with the enormous quantities of data associated with large-scale atmospheric modeling and data collection makes computer-driven graphics a necessity. NCAR's hard copy microfilm production alone has exceeded 8,000,000 frames per year over the last several years. Currently, NCAR supports an expanding local network of mainframes, minis, diverse graphics equipment, and other peripheral equipment. The utilization of the resources is approximately half by resident NCAR staff and half by visitors and RJE users. The evolution of the Computing Facility to its present state has had two major implications for the heavily used graphics system. First, it was realized that new output devices were going to be acquired; access to these had to be provided quickly, and users would have to be given the capabilities to painlessly switch output devices from one run to the next, use multiple output devices on a single run, and even transmit graphical information to unknown devices at remote locations. Second, the popular family of graphical utility routines would have to migrate to new computers. These machines would include not only those added to the local network, but also computers at the home institutions of visitors who wished to transport their programs home with them. TWo design features of the NCAR Graphics System have proved to be most valuable in its adaptation to a chang- ing environment. First, it is device-independent: when application programs that use the system are designed, no foreknowledge is required of what device is going to display the results. Second, it is portable: the system is easily installed on new computers, and provides an un- changing user interface from one machine to the next.
GRAPHICS SYSTEM - 2 Figure 1. NCAR Network Configuration (December, 1979)
CHARACTERISTISt
FCactional The NCAR Graphics System is a data representation system, haracteristics as distinct, for example, from the color image systems widely employed in commercial and media work. Its func- tions are heavily oriented toward organizing large amounts of numerical data and producing concise visual representations. Its capabilities are most suited for the representation of scientific and technical data: an- notated graphs and scatter diagrams, a number of dif- ferent techniques for presenting two- and three- dimensional data fields, and high quality text fonts suitable for annotation of publication-ready technical figures. It is weak in those display methods widely used in business data representation, such as bar charts, pie graphs, and commercial-quality text fonts.
GRAPHICS SYSTEM - 3 The system is primarily passive. Following directives from a user application program (which may be interac- tive), the system adds elements to the picture under development, but does not allow the sort of intense user interaction with the picture that is typical of CAD/CAM systems. Thus, the elements of the picture cannot be al- tered after they have been created.
Finally, the system is a vector graphics system. It can drive almost any plotter or plotter-like device to pro- duce line drawings, as contrasted with television-like images of raster oriented systems.
Capabilities At the simplest level, the user has direct access to rou- tines for plotting points, lines, curves, characters, and for generation of basic backgrounds. Figures 2 and 3, on the other hand, contain a sample of each of the major high-level functional capabilities of the NCAR Graphics System. For display of one-dimensional data, the system has a powerful automatic graphing package; among its capabili- ties are very sophisticated annotated backgrounds, multi- ple labelled curves per graph, and multiple labelled graphs per picture. One-dimensional data can be displayed under more direct user control with the family of software dashed line packages; four levels of quality are available, ranging from simple software dashed lines to spline-smoothed software dashed lines with labels in- serted and crowded lines eliminated.
Two-dimensional data fields can be displayed in a number of ways. Contouring of both gridded and arbitrarily scattered data is available in the same four levels of quality offered by the dashed line support family. There is the capability as well for grayscale representations of data fields, where the gray levels are simulated by dense and carefully constructed dot patterns. Iwo- component fields, such as wind fields, can be represented by either vector fields which preserve magnitude and direction, or by streamlines which show only the flow pattern of the field. Finally, three-dimensional per- spective representation with hidden line removal is available for two-dimensional fields which are proper mathematical functions of two variables.
GRAPHICS SYSTEM - 4 Figure 2. Utilities Samples
DEMONSTRATIONPLOTFOR EXAMPLE7 IEZMXYI DASHSMTH I PAT-DADOAADADADADAK-I LINES OF CONSTANTINCRUDESCENCE
DISTANCEFROM EQUATOR IMILESI
KI. _...... 'K - ......
IPAT=DDDDDDDADOODA,. K,2
-K = 2-K23-_ K
IPAT=ODDDDAAAAADODOD,K=4
(I 'K 3
PATDDDADDDADDDADDD. K:5
IN IPAT STRINGS,A ANDD SHOULDBE INTERPRETEDAS APOSTROPHE ANDDOLLAR SIGN
DEMONSTRATION PLOT FOR ENTRY HAFTON OF HAFTON
vs ,,1 !. -sI -1 f r -' 1 l g I 1- T | W J W
'D::,3 ..i i :,0:.if .l.,, ,E, ,:.L- :. ,.r',;: :-:: :: :::::: ::: ::: :: :::: ::
L NGS PERK
. OEMONSTRATIONPLOT FOR ENTRY EZVEC OF VELVCT DEMONSTRATION PLOT FOR ROUTINE STRMLN . I
IIII
/, I I I I-'-' IIII / A / U / /