Skip to main content

2023 | Buch

Introduction to Computer Graphics

Using OpenGL and Java

insite
SUCHEN

Über dieses Buch

A basic understanding of the key techniques in computer graphics can open the door to this exciting field and its many applications, including for video games and for augmented and virtual reality.

This easy-to-follow textbook and reference introduces the fundamental concepts of computer graphics, integrating both technical background and theory with practical examples and applications throughout. Thoroughly revised and updated, this new edition continues to present a user-friendly approach to creating images and animations, complementing the expanded coverage of topics with usage of example programs and exercises.

Topics and features:

Contains pedagogical tools, including easy-to-understand example programs and end-of-chapter exercisesPresents a practical guide to basic computer graphics programming using the Open Graphics Library (OpenGL) and the widely used Java programming languageIncludes new and expanded content on the OpenGL graphics pipelines, shader programming, drawing basic objects using the OpenGL, three-dimensional modelling, quaternions, rasterisation, antialiasing and moreSupplies complete Java project examples as supplementary material

This reader-friendly textbook is an essential tool for second-year undergraduate students and above, providing clear and concise explanations of the basic concepts of computer graphics. It will enable readers to immediately implement these concepts using the OpenGL and Java (with only elementary knowledge of the programming language).

Prof. Dr.-Ing. Karsten Lehn works at the Faculty of Information Technology at Fachhochschule Dortmund, University of Applied Sciences and Arts. Prof. Dr. Merijam Gotzes is teaching at Hamm-Lippstadt University of Applied Sciences. Prof. Dr. Frank Klawonn is head of the Data Analysis and Pattern Recognition Laboratory at the Ostfalia University of Applied Sciences and heads the Biostatistics Research Group at the Helmholtz Centre for Infection Research.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Introduction
Abstract
Computer graphics is the process of creating images using a computer. This process is often referred to as graphic data processing. In this book, an image is understood in an abstract sense. An image can represent a realistic scene from the everyday world, but it can also be graphics such as histograms or pie charts, or the graphical user interface of the software. This chapter presents examples of some application areas of computer graphics to give an impression of the broad spectrum of tasks in this discipline. This is followed by explanations of the main steps in computer graphics and an overview of how a rendering pipeline works using the graphics pipeline of the Open Graphics Library (OpenGL). This basic mode of operation can be transferred to other graphics systems.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 2. The Open Graphics Library (OpenGL)
Abstract
The OpenGL is a graphics programming interface that has become very widespread in recent decades due to its open concept and platform independence. Drivers of common graphics processors and graphics cards for the major operating systems support the OpenGL. After a brief overview of existing programming interfaces for graphics applications, this chapter explains the basics of the Open Graphics Library (OpenGL) in detail. The functionality is presented in such detail to enable an understanding and classification of the basic concepts of computer graphics contained in the following chapters. At the same time, this chapter can serve as a concise reference book about the OpenGL. This is limited to the OpenGL variant for desktop operating systems. Furthermore, this chapter contains basic Java programming examples for graphics programming with and without shaders.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 3. Basic Geometric Objects
Abstract
This chapter describes basic geometric objects that are used in computer graphics for surface modelling. Furthermore, the planar basic objects used in the OpenGL and their use through OpenGL drawing commands are explained. The graphic primitive points, lines, triangles, polygons and quadrilaterals (quads) used in the OpenGL are considered in more detail. The OpenGL has graphic primitives to draw sequences of basic objects, allowing surfaces of objects to be represented efficiently. In addition, there are OpenGL drawing commands, such as indexed drawing, primitive restart and indirect drawing, to enable drawing by a graphics processor independent of the graphics application. Many of the concepts used in the OpenGL are also used in a similar form in other graphics systems.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 4. Modelling Three-Dimensional Objects
Abstract
This chapter contains an overview of the basic approaches for modelling three-dimensional objects. Since modelling of surfaces of objects is of great importance in computer graphics, special attention is given to this. Often the (curved) surfaces of objects are approximated by planar polygons. Triangles are particularly well suited for this. In modern graphics processors, the tessellation unit can decompose a curved surface into planar polygons independently from the central processing unit. Freeform surfaces are well suited for modelling curved surfaces of three-dimensional objects and can be used as starting point for this decomposition. Therefore, this chapter presents the basics of freeform surface modelling. Special attention is paid to the normal vectors of the surfaces, as these are crucial for the calculation of illumination effects of the surfaces of objects.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 5. Geometry Processing
Abstract
This chapter presents the individual steps of the geometric transformations, which are necessary to be able to represent the geometry of real-world objects on the screen. After introducing the concepts in the two-dimensional plane, they are applied in three-dimensional space. The first step is the geometric modelling of each object as a model of the virtual world to be represented. This modelling is done for each object in its own coordinate system, the model coordinate system. Afterwards, all models are transferred into the coordinate system of the virtual scene, the world coordinate system. From this step on, the perspective comes into play, which is created by a view through the camera from the viewer’s location. Afterwards, all areas not visible through the camera are cut off, creating the so-called visible (clipping) area. The clipping area is then mapped onto the output device.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 6. Greyscale and Colour Representation
Abstract
This chapter contains the basics for the representation of computer graphics objects using grey values and colours. As an example of how grey values can be represented even though the output device can only produce completely black or completely white pixels, the halftone method is described. Furthermore, this chapter contains an overview of colour models that are used in computer graphics and related areas such as image processing and digital television. For professional applications, the exact reproducibility of colours on different output devices is required. For example, exactly the same colour should be the output on a printer as it appears on the monitor. For this purpose, the so-called calibrated colour spaces, also called colorimetric colour spaces, can be used. Furthermore, the basic colour models used in the OpenGL are presented and the basic principles of colour interpolation are explained.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 7. Rasterisation
Abstract
The representation of objects in the early stages of the computer graphics pipeline is based on the principles of vector graphics. This allows objects and scenes of objects to be transformed efficiently and without loss of detail. However, for display on common output devices, it is necessary to convert this vector-based representation into a raster graphic. This conversion process is referred to as rasterisation. This chapter compares the advantages and disadvantages of these representation types and presents algorithms for rasterisation. Furthermore, it explains the basic problems and important approaches to solving them that arise with rasterisation. When converting a vector graphic into a raster graphic, undesirable disturbances usually occur. These disturbances are called aliasing effects, which can be reduced by antialiasing methods. This chapter contains a detailed section on this topic. In particular, it shows which antialiasing methods are used in OpenGL.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 8. Visibility Considerations
Abstract
For the representation of a section of a three-dimensional model world, it must be determined which objects are actually located in the area to be displayed. In addition to these clipping calculations, only for the objects located in the visible area, the problem of obscuring objects or parts of objects by other objects must be solved. This chapter introduces three-dimensional clipping, the spatial reduction of the entire scene to the visible space to be displayed. This procedure is explained in two-dimensional space, which can easily be extended to the three-dimensional space. Straight-line segments are considered, since the edges of polygons can be understood as such. The concept of clipping volume is explained. In addition, this chapter describes procedures for determining the visible objects in a scene. These include backside removal and techniques that identify the visible areas of objects that are to be displayed in the case of concealed objects. These techniques are divided into object and image-space procedures, depending on whether they are applied to the objects or only later in the graphics pipeline to the image section.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 9. Lighting Models
Abstract
This chapter presents the basics for illumination in computer graphics. A distinction is made between local and global illumination models. In a modelled computer graphics scene, the light from modelled light sources hits the surface of objects, is reflected there and creates lighting effects depending on the material properties of the object surfaces. The Phong model is presented as an important representative of local illumination models. Furthermore, this chapter contains explanations of shading methods that determine how the polygons of the object surfaces are coloured on the basis of the lighting calculation. In a three-dimensional scene, not only objects are illuminated by light sources, resulting in certain (local) effects. In addition, some of the light is reflected from the surfaces of the objects, which in turn illuminates other objects. These interactions are modelled by global illumination models. The radiosity model can be used to model global diffuse reflections. Ray tracing methods are suitable for simulating global specular reflections. This chapter contains the basics of these two methods.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 10. Textures
Abstract
This chapter contains the basics for applying textures to three-dimensional objects (texture mapping). Textures are images or graphics that are applied to the surface of an object. They can be used to define or change the appearance of the surface of the object. Both the colour design and the geometry of the object can be influenced. Textures can be two-dimensional, most commonly in flat rectangular form, or three-dimensional in curved form. Textures can help to efficiently render scenes photorealistically with a very high level of detail without increasing the complexity of the surface geometry of objects. In addition, this technique can be used to visualise geometry with different textures. Furthermore, textures can be applied to different geometries. This chapter contains application examples to demonstrate the many possible uses for texture mapping.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Chapter 11. Special Effects and Virtual Reality
Abstract
This chapter contains selected special topics in computer graphics. Since virtual reality (VR) applications are an important application area of computer graphics, factors are explained that can create a high degree of immersion in such applications so that a user feels truly present in a virtual environment. Simulations of fog, particle systems or dynamic surfaces can create realistic effects in computer graphics scenes. For interactive computer graphics, the selection of objects and the detection and handling of collisions are important. This allows users to explore and manipulate three-dimensional virtual worlds. For these topics, this chapter contains the technical basics, supported by OpenGL examples for most topics. Since the sense of hearing contributes greatly to immersion and thus presence, this chapter presents some important findings and technical principles for auralising acoustic scenes. The last part of this chapter contains a summary of important factors for the creation of a visual impression of depth in a scene. The focus is on seeing with both eyes (binocular vision) and the technical reproduction through stereoscopic output techniques. These techniques are used in 3D television and virtual reality headsets.
Karsten Lehn, Merijam Gotzes, Frank Klawonn
Backmatter
Metadaten
Titel
Introduction to Computer Graphics
verfasst von
Karsten Lehn
Merijam Gotzes
Frank Klawonn
Copyright-Jahr
2023
Electronic ISBN
978-3-031-28135-8
Print ISBN
978-3-031-28134-1
DOI
https://doi.org/10.1007/978-3-031-28135-8

Neuer Inhalt