IGS is a graphic library which enables the user to easily program graphics in two or three dimensions. Basic idea of IGS is to enable the user programming of graphics without worrying about how to implement rotations of graphic objects, surface hiding in three dimensions, output in different graphic formats and similar things.
How the system is built can be best seen from a scheme of a typical IGS-based application (you can download the same scheme in PostScript and view it with Ghostview).
The most basic part of the system is a simple graphic interface (module grint) which can be based on an arbitrary graphic library installed on the machine where IGS is used. This interface is the only part of IGS which is platform dependent, all other parts need only standard ANSI C for compilation. So, if you want to build IGS on a different platform, only this module must be reprogrammed. This is usually not a hard task because module grint contains only the most basic graphic functions such as for opening and closing windows, drawing primitives (lines, triangles, fourangles, circles, faces, text) in a window, etc. The first library on which module grint (and IGS) was built was PEXlib. Later IGS was also built on Borland's BGI (which was not work out very well because of problems with memory - BGI runs only on DOS) and Xlib. Implementation built on Xlib is presently the most often used; there can still be some problems with colors an fonts with this implementation, but otherways it works quite well and is much faster than the implementation built on PEXlib).
The central part of IGS is module gro. This module contains the definitions which constitute the basic concepts of graphic objects construction and manipulation in IGS. It includes the definitions of data types with which graphic objects are represented.
Further on, it includes auxiliary fuctions for construction of complex graphic objects.
Functions for manipulation with graphics objects follow, i.e. functions for different kinds of geometric transformations, for sorting primitive objects according to their depth etc.
Another part of this module takes care of plotting of complex graphic objects on screen and to files in different formats. This part is unified in new versions of IGS (in old versions there were separated submodules for plotting in different formats). IGS currently supports output of graphics in Tcl, PostScript, and DXF. A plotting part of module gro includes many auxiliary functions which help to achieve a specific look of graphs, such as functions for lighting and plotting in different perspectives.
Beside the basic modules described above, IGS is extended with some higher level modules. These modules provide functions for construction of graphic objects which are often used in graphs, for example different kinds of grids, simple function plots, parametric function plots, polar plots etc. Module gr3d provides a set of such functions for plotting in three dimensions, while module gr2d provides similar functions for plotting in two dimensions. Development of additional module which will provide some FEM post-processing extensions was started in May 1997 by Damjan Jelovsek.
It is quite simple to use IGS in an application. Basic steps of plotting a graph in an application using IGS are shown in figure.
First, graphic objects are constructed for things user wants to plot. This is the only step user must program alone. Therefore the only graphic thing users must care about when using IGS is how the graph he wants to produce and plot is built in sense of primitive graphic objects like lines and faces. Auxiliary functions for construction of complex graphics objects using primitive objects are provided in module gro.
The next step is putting primitives from a tree structure created by user to a stack. This must be doe only at plotting in three dimensions as a preparation for sorting graphic primitives by theit depth. Functions for this task are provided in module gro.
Before plotting can start, initialization of grapgic interface must be done and windows must be open using functions from module grint.
Plotting can now be performed in a loop. All tasks are performed by functions from module gro: First, geometric transformations are applied to graphic object and geometric limits are set. Next, primitives are sorted by their depth and finally they are plotted one by one in order to obtain a possibly three-dimensional plot of our graph. If necessary, user can exporta plot in a file in one of the formats supported by IGS.
For more better feeling about details you can download a programmer's handbook in PostScript and view it by Ghostview or print it by a PostScript printer. Note that the handbook is written in Slovene language!
IGS is a shortcut for "Igor's Graphic System" ( I could afford such name because IGS is presently used only internally in C3M). I began to develop it in April 1996. By the end of 1996, IGS was developed enough to be used for building applications with it. In February 1997, I started with introduction of IGS to other members of our staff, who made their first applications based on IGS in spring. My goal is to encourage other members of staff to use IGS in their applications so that IGS would begin to live. Another goal is to draw another people in development of the system itself to gain experience in close team work.