Comput. & Graphics, Vol. 20, No. 2, pp. 341-346, 1996 Copyright 0 1996 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0097-8493/96 $15.00 + 0.00 0097-8493(9!5)00135-2 Education COMPUTER GRAPHICS INTERFACE (CGI): A GOOD CONCEPT AND A VALUABLE TOOL FOR RESEARCH AND TEACHING IN COMPUTER GRAPHICS DIETER W. FELLNER+ and MARTIN FISCHER Department of Computer Science, University of Bonn, RijmerstraBe 164, 53117 Bonn, Germany e-mail: fellner@graphics.cs.uni-bonn.de Abstract-This paper briefly describes the design of a device and platform independent graphics interface called CGI+ + which has been developed along the ideas of the CGI standardization work done by IS0 and discusses its potential as a programing environment for lab assignments. CGI+ + has been used for programming assignments of 2-D and, to a certain extent, 3-D graphics problems at the University of Bonn over the last two years in graphics classes at the undergraduate and graduate level. Recent experiences with CGIf + applied in an industry project prove that the system is not only a valuable teaching tool but a very fast, efficient, and productive graphics environment. Copyright 0 1996 Elsevier Science Ltd 1. INTRODUCTION In order to successfully develop graphical applica- tionsfor UNIX workstationsas well asother typesof workstations, system designers have to deal with several incompatible standards, both issuedfrom standardization institutes(e.g. ISO, ANSI) aswell as enforced by successful softwarepackages. Though a lot of activities are focused on 3-D graphics, 2-D graphics interfaces are dominating commercial applications, becausemost computer graphics applicationsare still based on 2-D rather than on 3-D. The two most significantpackages for 2-D graphics standardsare GKS and X Window, both less than optimal as a general interface for building graphics applications. X Window [l] is a low level graphicsinterface (not primarily developed for the graphicsworld) that requires a lot of code to perform a simple task. GKS [2] is designedto simultaneously drive multiple output devices.Being the first graphics standarddeveloped by the graphics community it hasbecome a little bit dated by today. Even with the new version of GKS beingjust about to becomean international standard, it is unlikely that GKS will be adopted as the primary tool of building graphics interfaces. Responding to the demandof an easy to under- stand, easyto learn graphics interface, not primarily geared at pixel operations, we decided to build a new interface based on CGI (short for Computer Graphics Interface) [3]. CGI has beendefined as a virtual device interfacing functional standards like GKS to any real device. + Author for correspondence. The new interface, called CGIC + [4], corresponds to a subset of CGI (closely related to CGI Advanced l-Way Output Profile), but with minor modifications to cater for various window environments. Each CGI+ + device corresponds to a singlewindow in a window e:nvironment. 2. IhfPLEMENTIN G CGI-WHAT HAD TO BE DONE The functionality of the Advanced l-Way Output Profile haid to be enhancedto create a graphics interface with the potential for a wide acceptance. It was obviously necessary to add input function- ality to the interface for reading keyboard input and for reading mouse input (in world coordi- nates). Implementing all output primitives specified by CGI turned out to be harder than expected:at the time this project started there was no robust and efficient raster algorithm available for the rendering of genera11 ellipses (i.e. ellipses not aligned to the coordinate axes) and elliptical arcs. Thus, a new ellipse algorithm had to be developed [S]. One of the frequent complaints by users of graphicsstandards like GKS or PHIGS [6, 71was the unattmctive appearance of text compared to that of typical window systems. As a consequence the rendering of TrueType fonts, which have become quite popular recently, has been integrated into CGI+ + thus providing a text quality comparable to text publishing systems. Another problem application programmers fre- quently run into are the undesired color table changescaused by different applications sending output to one screen. This problem has beensolved with a special color management. 341