The Multics Graphics System is documented in the Multics manual "Multics Graphics System" (AS40-01A), which can be found here: Multics Graphics System. The Introduction section, below, is taken directly from the first section of that manual.
The Multics Graphics System (MGS) provides a general purpose terminal-independent interface through which user or application programs can create, edit, store, display, and animate graphic constructs.
Primitives are provided for manipulating a structured picture description composed of lines, points, screen modes, rotations, translations (position shifts), and scalings, in three dimensions. Primitives are also provided for displaying parts of such a graphic structure, for animating an already displayed structure, for obtaining graphic input, and for controlling special terminal functions (such as screen erase). These primitives are suitable for direct use by a knowledgeable programmer.
The structured picture description interface primitives, in addition to being well-suited for a wide variety of graphic programming tasks, are also well-suited for use as building blocks by application modules that provide simpler or more application-oriented interfaces. Efficiency is enhanced by providing several alternate forms for storing graphic information that promote efficient editing of frequently changing graphic constructs and efficient storage and "play-back\ of background scenes and standard display pictures.
The MGS is terminal-independent; that is, a graphic program written for one type of graphic terminal is operable on another graphic terminal of similar capabilities without modification. Users are not isolated by the particular type of graphic terminals used and can use graphic programs developed on different terminals by other users. They also are not restricted by their programs to particular terminal types, but can use any available graphic terminal. Graphics subsystems written for specific terminals can be easily transferred to new and better terminal types.
Terminal-independence is achieved in the MGS in the following way. The programming interface incorporates the most useful features of existing terminals and allows the addition of new features as graphic terminal capabilities evolve. Users tailor their programs to use the features of the terminal types intended for use. When the program is run, the use of any unavailable feature can be mapped by the system into the most reasonable compromise feature of the terillin&l being operated. Thus, users have a reasonable guarantee that their graphic programs will produce a recognizable picture on almost any type of graphic terminal connected to Multics. Of course, not all graphic programs will operate equally well on any type of graphic terminal (e.g., animation is not possible on a storage-tube terminal).
Although the MGS is discussed in this manual largely in terms of PL/I, the MGS is designed to be usable from FORTRAN, and for the most part, from many other Multics programming languages.
MGS is set up by running the setup_graphics (sg) command. In most common usage a Graphics Device Table (GDT) name is provided with the -table (-tb) control argument. For example:
sg -tb tek_4014
System provided GDTs are bound in the bound segment >unb>bound_graphics_gdts_. The following GDTs are provided to support the associated graphics terminals and devices:
The setup_graphics command sets up two I/O switches: graphic_input and graphic_output. Programs that emit MGS graphics will write directives to the graphic_output switch. Input devices will provide their input on the graphic_input switch.
For example, if you have a Tektronix 4014 (emulated) terminal connected to Multics, and you issue the sg -tb tek_4014 command, then when you run a graphics program, the device independent graphics produced by the program will be converted to Tektronix 4014 graphics, and sent over the graphic_output switch, and rendered on your Tektronix 4014 terminal.
The AML program graphic_print (gfpr) will accept as an argument a pathname of a segment containing device independent MGS graphics commands. Given that you've run setup_graphics -tb tek_4014, the device independent graphics will be converted to Tektronix 4014 graphics, and sent to your terminal. The convension is for segments containing MGS graphics to have an extension of .graphics.
The AML library contains various examples of .graphics segments in the >aml>graphics_demo directory (not yet available under MR12.8).
So, the graphic_print >aml>graphics_demo>snoopy.graphics command would display a picture of Snoopy on your graphics terminal.
MGS is not limited to static graphics stored in a .graphics segment. You can write graphics programs that dynamically generate graphics and send them to the graphics terminal. Examples of these programs (in AML) are:
and others.
Note: These will be part of the MR12.9 AML library.
For detailed documentation on writing MGS programs, see Multics Graphics System.
The following example program, found in >aml>graphics_demo>p_sin.pl1, shows how to use MGS to provide a simple graph of x versus sin(x):
p_sin: proc (arg);
dcl arg char (*);
dcl x (180) float bin,
y (180) float bin,
i fixed bin,
pi float bin static internal initial (3.14159e0),
three_cyc float bin,
plot_ entry ((*) float bin, (*) float bin, fixed bin,
fixed bin, char (1)),
plot_$setup entry (char (*), char (*), char (*), fixed bin,
float bin, fixed bin, fixed bin),
(sin, float) builtin;
three_cyc = 6e0 * pi / 180e0;
do i = 1 to 180;
x (i) = three_cyc * float (i - 1);
y (i) = sin (x (i)) * float (arg);
end;
call plot_$setup ("Sin (x) vs. x", "Radians", "Sin value", 1, 0e0, 1, 0);
call plot_ (x, y, 180, 1, "");
return;
end;