Computer Graphics (GRK)
Lecture XII

Resume

In individual lectures we have learned basic notions and methods of computer graphics. All discussed algorithms are used in practice in different graphic application programs. Knowledge of this algorithms enables better understanding of action of individual tools met in graphics programs, their abilities and limitations. Moreover it enables the possibility to create own graphics programs.

There exist a few hundreds of graphics programs, starting from free programs and ending with expensive professional commercial systems. They may have different functional abilities. The choice of specific program is conditioned by actual application. In simple applications usually it is sufficient to use one from the available programs. At more advanced applications sometimes it is necessary to use a few programs, using the unique abilities of individual program. The information about available programs may be found on web page www.dobreprogramy.pl in bookmarks programy and then grafika.

Although the huge commercial offer exists, there is still a lot to do. At the same time the constant need of the programs with more functional abilities, more user friendly and adjusted to specific user needs is still present. During creation of own programs we may use low level library programs which make available a set of graphical commands or functions. These libraries may be used from the level of the different programming languages level (C++, Java etc.) They give program interface to computer graphic hardware. The most popular library programs are OpenGL and DirectX.

The calculations usually have hardware support. Not so long ago the support was concentrated on raster rendering support. Typical sequence of calculations, referred to as graphics pipeline is shown in Fig. XII.1.

Figure XII.1

Fig. XII.1. Typical graphic pipeline

At the beginning hardware realisations of pipeline did not allow programming of particular stages of calculations. Now we use graphic processors (GPU) that enable programming pipeline elements by the user. These programmable stages are marked with green colour on the figure. The stages marked in blue colour are configurable (without the possibility to program). Two stages marked in yellow have the hardware realisation only.

Distinguished in Fig. XII.1 vertex shader stage enables the execution of user own programs concerning operations on vertices of objects or triangle meshes approximating lateral sides of the objects. Here we may find operation concerning geometric transformations, change of coordinate systems, attributes associated with vertices (such as normal vectors, texture coordinates (u,v), colour).

Clipping stage eliminates these fragments of scene, which could not appear on the screen (located outside the frustum) from the calculations.

Next stage allows image transfer to screen coordinates.

Rasterisation stage includes calculations concerning triangle rendering (previous stages perform calculations with respect to triangle vertices) and defining the colours of the pixels belonging to the triangles.

Pixel shader stage enables calculations concerning pixel colour including texturing.

The last stage ROP (Raster Operations) allows combining the new calculated pixel(fragment) value with the information calculated earlier. Here the problem of visibility is solved using the z-buffer.

Contemporary graphic processors with stream architecture (SIMD) are the most complex processors on the market. They allow subsequent processing of ordered sets of similar data (for example sets of triangle vertices or pixels). GPU processors are gaining still more and more computational power. For example Nvidia GPU Turing (consisting of about 18.6 billions - $10^9$ of transistors) has about 5000 cores. It enables raster rendering, and also ray tracing rendering. It may also support the calculations concerning Artificial Intelligence, especially advanced neural nets (deep learning) and advanced calculations of objects surface shading.

Graphic processors contain great numbers of multiprocessors, what encourages many users to use GPU resources to perform parallel computations not only in computer graphics but also in another applications. In order to make such calculations easier Nvidia developed programming environment CUDA (Compute Unified Device Architecture).

Summarizing the lecture part of the course I hope that presented materials were understandable, and explained what is about in computer graphics, and at the same time rises the reflection that many problems still appear, that requires solution. Such reflection is fully justified. Computer graphics is very broad branch of science and it is impossible to present all the problems in the scope of a single lecture. At the same time the branch is still under development - constantly new method appears, which enable faster creation of better quality images. The new areas of application still appears requiring new solutions development.

I think also, that enclosed to particular lectures questions and problems for individual solving enables every time the verification whether the lecture has been well understood. The questions and problems are chosen in such way that it is possible to find the answer directly in the lecture content or else to obtain the solution individually using acquired knowledge. If there is any difficulties with finding solution or some parts might occur incomprehensible, please contact me by e-mail (jza@ii.pw.edu.pl). I would be grateful for pointing possible defects and for any suggestions that allow making this course better.

Surely the theoretical material presented in lectures will be useful for laboratory classes, where we will learn practically the tools used in computer graphic programs.

Because, as it was signalled at the beginning of the course, we are facing the examination concerning lecture material, below the examples of examination themes are shown.

In each theme from 1 to 10 three statement are given. Some of these statement are correct, some are not. Please write in appropriate fields YES when the statement is true or NO when the statement is not correct. For each theme 1 to 10 three points are gained when three answers are marked correctly. For each theme 11, 12, 13 ten points may be gained. The required minimum for positive mark is 31 points.

1. Basic raster technique algorithms

a. In circle drawing algorithm we use circle symmetry

b. The line segment with end points coordinates (2,1), (5,6) drawn by Bresenham algorithm consists of 6 pixels

c. Aliasing results from limited raster resolution

2. Colour in computer graphics

a. Colour notion is human perception sensation

b. Model RGB represents all visible colours

c. In chromaticity diagram spectral saturated colours are placed on the perimeter of the diagram

3. Basic geometric transformations

a. A square with vertices coordinates (0, 0), (1, 0), (1, 1), (0, 1) was subjected to scaling with coefficients Sx = 2, Sy = 3 and translated about vector (3, 2). Coordinates of the one of vertices of resultant figure are (2, 5)

b. Point with homogeneous coordinates (5, 4, 3, 1) in coordinate system xyz has coordinates (5, 4, 3)

c. In rotation transformation pivot point must lie in the origin of coordinate system


11. Describe Bezier curves.

12. Explain the difference between flat shading, Gouraud shading and shading using Phong equation.

13. Describe the ray tracing method.