The primer is an informal introduction to the SMOG and SPROGS graphics systems (on the Rutherford Laboratory's ICL 1906A). The primer should familiarise the user with some of the techniques and terminology associated with SMOG and SPROGS. It treats the graphics systems as a whole rather than explaining each individual part and thus, the primer should be used in conjunction with the system's manuals rather than instead of them. The primer shows how to use the graphics systems to solve specific problems giving users with similar problems an example to work from.
All of the examples are fairly simple in nature; typically a problem is described with a method of solving it. Where appropriate a program listing, a command to run the program and the graphics output produced are shown as well. A copy of each example program (and data file if required) is kept in the directory :GRAFEX to save users from having to type them themselves. Each user has access to any of these files and is advised to try at least one of the examples using SMOG or SPROGS.
SPROGS is the all singing, all dancing graphics package. It is designed to do anything the user wants (if only he can find out how). SPROGS (and SMOG) are sets of routines callable from a FORTRAN program. This allows anyone who can program in FORTRAN access to the system, in fact with a little practice the non-programmer should soon grasp the essentials - and after a few attempts will produce some graphical output. It is surprising just how good that first picture looks when at last it is produced; a few weeks later it has been thrown away as better and better quality is achieved. One of the philosophies of SPROGS is that once the required quality has been achieved then keep it, instead of reproducing it again each time. To this end a complex file structure and library system are incorporated in SPROGS.
The major drawback of SPROGS is that due to all of these facilities (see below) it is rather large and comparatively time consuming. The list below describes the majority of these extra facilities:
The SMOG system was written as a result of the discussion at the Graphics Seminar held at the Atlas Computer Laboratory on 31 October 1974. The primary aim of SMOG is to provide users with a graphics package that is very small and very fast. It should draw lines, plot characters and use either user or device coordinates. The second decision taken was the basing of SMOG on SPROGS; thus if a user finds that he requires more facilities than those available in SMOG then he can change to SPROGS without the need to alter his program.
SMOG has many restrictions, for example, only one graphics device can be used in any run, there is no library creation facility. The list of what it cannot do is quite large but most users do not want these facilities anyway, and perhaps a more important consequence is that the internal structure of SMOG is such that the user includes the routines to communicate with the graphics device and any others he requires but no more. It is possible to include in the system user-orientated, high-level routines without penalising those who do not wish to use them, for example, routines for 3-dimensional work.
Both SMOG and SPROGS are reasonably stable systems in that no major rewrites are planned and only the occasional routine is added where necessary. The current enhancements to the systems are the provision of more specialised application routines. These routines are not necessarily a part of either SMOG or SPROGS and as such do not cause any changes to the basic systems. There is an added advantage in that only one copy of each routine is required regardless of which system is to be used.
The single version of each routine (most of which can be run using either graphics system) is kept in the graphics library. As each set of routines is added to the library a GRAPHICS USER NOTE is issued explaining its use. The graphics library is explained in more detail in Section 4 together with some examples of the use of several sets of routines.
SPROGS and SMOG are sets of routines which are callable from FORTRAN programs. There are usually three sets of graphics routines called; firstly, routines to initialise the system and select the required devices; secondly, routines to produce the graphical output; and finally, routines to terminate the graphics system properly.
If the user has only one device, as he must in SMOG, then system initialisation and device selection is a fairly simple procedure. In the case of output to the Tektronix, this is all accomplished by calling the routine TKTRON. Several other things are needed to send the output to the Tektronix but these will be explained later.
An example of a program to produce output on the FR80's 35mm black and white camera is as follows:
MASTER EXAMPLE 1 CALL FRBW35 C----REPLACE THESE COMMENTS BY CODE C----TO PRODUCE GRAPHICAL OUTPUT. CALL ENDSPR STOP END FINISH
This program will produce a piece of 35mm film which has the user's identification frames on it (see 1.4.3), one at the start and one at the end-of the 35mm output. The MASTER, STOP, END and FINISH statements are standard 1900 FORTRAN and the call to ENDSPR is to inform the graphics package that no more graphical output is to be produced and so the system can output the terminating identification frame. It should be noted that if ENDSPR is not called then the final buffer is not emptied and some of the graphical output may be lost.
If the above program was in the user's filestore as file PROGRAM1, say, then to run it when one is logged in at a MOP console one could type in any of the following commands:
TASK F,SPROGS,*CR PROGRAM1,JT25 TASK F,SMOG,*CR PROGRAM1,JT20 SPROGS *CR PROGRAM1,JT25 SMOG *CR PROGRAM1,JT20
depending on which system, SPROGS or SMOG, is desired. This is not an exhaustive list of ways of accessing the systems when logged in, just a few examples, (see section 4.3.4).
The following deck of card will run the example program shown above:
JOB JOBNAME,:NTBE34,JD(JT30),T//// SPROGS *CR MASTER EXAMPLE 1 CALL FRBW35 C----REPLACE THESE COMMENTS BY CODE C----TO PRODUCE GRAPHICAL OUTPUT. CALL ENDSPR STOP END FINISH EJ ////
The identification frame below is from the end of a many-up hardcopy job. Its major use is to aid the FR80 operators in identifying the owner of the piece of film or hardcopy.
Note that the FR80 statistics (for example, DATE RUN) are not implemented at the time of printing.
The graphics systems SMOG and SPROGS provide users with routines which are callable from FORTRAN programs. The graphics routines can be called from any point in a user's program in just the same way as one calls one's own subroutines. In general the first routine called must initialise the system and select a graphics device. The last graphics routine called must be ENDSPR, although this need not be at the end of a user's program. ENDSPR informs the system that no more graphical output is expected and that it can tidy up - for example by emptying buffers and outputting the identification frame.
Finally one can consider SMOG and SPROGS as being similar to the ordinary Atlas TASK/FORTRAN system but providing a larger library of routines and allowing easy access to a greater variety of devices.