Computer graphics provides methods to generate images using a computer. The word image should be understood in a more abstract sense here. An image can represent a realistic scene from the real world, but graphics like histograms or pie charts as well as the graphical user interface of a software tool are also considered as images. The following section provides a brief overview on typical application fields and facets of computer graphics.
1.1 Application Fields
Graphical user interfaces can be considered as an application of computer graphics, although they do not play an important role in computer graphics anymore. On the one hand, there are standard programming tools and APIs (Application Programming Interfaces) for the implementation of graphical user interfaces and on the other hand the main emphasis of user interfaces is the construction of user-friendly human computer interfaces and not the generation of complex graphics.
In advertising and certain fields of art pictures are sometimes designed using the computer only or photos serve as a basis and are modified or changed with computer graphics techniques.
Large amounts of data are collected in business, industry, economy and science. In addition to suitable data analysis techniques, methods for visualising high-dimensional data are needed. Such visualisation techniques reach much further than simple representations like graphs of functions, pie or bar chartsgraphics that can already be generated by todays standard spreadsheet tools. Two- or three-dimensional visualisations of high-dimensional data, problem-specific representations of the data [] or animations that show dynamic aspects like the flow of currents or the change of weather phenomena belong to this class of applications of computer graphics.
Apart from constructing and representing such more abstract graphics, the generation of realistic images and sequences of imagesnot necessarily of the real worldare the main application field of computer graphics. Other areas that were the driving force in the early days of computer graphics are CAD/CAM (Computer-Aided Design/Manufacturing) for the design and construction of objects like cars or chassis. The objects are designed using a suitable computer graphics software and their geometry is stored in computers. Nowadays, not only industrial products are designed in the computer, but also buildings, gardens or artificial environments for computer games. Very often, real existing objects have to be modelled and combined with hypothetical objects, for instance when an architect wants to visualise how a possible extension of an old house might look. The same applies to flight or driving simulators, where existing landscapes and cities need to be modelled in the computer.
The possibilities of designing, modelling and visualising objects play an important role in computer graphics, but also the generation of realistic models and representations of objects based on measurement data. There are various techniques to obtain such data. 3D laser scanners can be used to scan the surface of objects or a set of calibrated cameras allows to reconstruct 3D information of objects from their images. Medical informatics [] is another very important application field of computer graphics where measurements are available in the form of X-ray images or data from computerised tomography and ultrasonic testing. Such data allow a 3D visualisation of bones or viscera.
The combination of real data and images with techniques from computer graphics will probably gain more importance than it has today. Computer games allow to navigate through scenes and to view the scenes from different angles. For movies, as they are shown on TV or in cinemas, the choice of the viewpoint is not possible anymore once the movie has been produced. Even if various cameras where used to capture the same scene from different angles, one can only choose between the perspectives of the different cameras. But it is not possible to view the scene from a position between the cameras. The elementary techniques allowing a free choice of the viewpoint are available in principle today [].
Other important fields of application of computer graphics are virtual reality [], where the real world is enriched by additional information in the form of text or virtual objects.
1.2 From a Real Scene to an Image
The various application examples of computer graphics discussed in the previous section demonstrate already that a large variety of different problems and tasks must be solved within computer graphics. Figure illustrates crucial steps that are needed in order to generate an image from a real or virtual scene.
Fig. 1.1
From a scene to an image
As a first step, the objects in the scene in Fig. b illustrates this problem of approximation by assuming that the computer graphics tool is very restricted and the bowl in the real scene can only be approximated by a semisphere.
The modelled objects usually cover a much larger region than the part that is visible for the virtual viewer from his viewpoint. The model might for instance include a group of buildings surrounded by gardens and the viewer can move in the buildings and through the gardens. When the viewer is in a room of one of the buildings looking into the room, but not outside the window, he can only see a very small fraction of the objects of this virtual world. Most of the objects can therefore be neglected, when the image is generated. Taking the viewers position and the direction of his view into account, a three-dimensional region must be defined that determines which objects might be visible for the viewer (see Fig. c). The computation of which objects belong completely or at least partly to this region is called clipping or, more specifically, 3D-clipping . Not all objects located in the clipping region might be visible for the viewer, since some of them might be hidden from the viewers view by other objects, which are closer to the viewer.
The visible objects in the clipping region need to be projected onto a two-dimensional plane in order to obtain a flat pixel image as shown in Fig. d that can be printed out or shown on a computer screen. This projection requires the application of hidden line and hidden surface algorithms in order to find out whether objects or parts of the objects are visible or hidden by other objects. The effects of light like shading, shadows and reflection are extremely important issues for the generation of realistic images. 2D-clipping is also necessary to decide which parts of the projection of an object in the 3D-clipping region lie within the projection plane.
The whole process of generating a pixel image from a three-dimensional virtual scene is called rendering . The successive composition of the single techniques that are roughly outlined in Fig. ] five different rendering pipelines are explained only within the context of lighting and shading.