Skip to main content

2017 | Buch

Computer Graphics for Java Programmers

insite
SUCHEN

Über dieses Buch

This third edition covers fundamental concepts in creating and manipulating 2D and 3D graphical objects, including topics from classic graphics algorithms to color and shading models. It maintains the style of the two previous editions, teaching each graphics topic in a sequence of concepts, mathematics, algorithms, optimization techniques, and Java coding.

Completely revised and updated according to years of classroom teaching, the third edition of this highly popular textbook contains a large number of ready-to-run Java programs and an algorithm animation and demonstration open-source software also in Java. It includes exercises and examples making it ideal for classroom use or self-study, and provides a perfect foundation for programming computer graphics using Java.

Undergraduate and graduate students majoring specifically in computer science, computer engineering, electronic engineering, information systems, and related disciplines will use this textbook for their courses. Professionals and industrial practitioners who wish to learn and explore basic computer graphics techniques will also find this book a valuable resource.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Elementary Concepts
Abstract
This book is primarily about computer graphics programming and related mathematics. Rather than discussing general graphics subjects for end users or how to use graphics software, we will cover more fundamental subjects, required for graphics programming. In this chapter, we will first understand and appreciate the nature of discreteness of displayed graphics on computer screens. We will then see that x- and y-coordinates need not necessarily be pixel numbers, also known as device coordinates. In many applications, logical coordinates are more convenient, provided we can convert them to device coordinates before displaying on the screen. With input from a mouse, we would also need the inverse conversion, i.e. converting device coordinates to logical coordinates, as we will see at the end of this chapter.
Leen Ammeraal, Kang Zhang
Chapter 2. Applied Geometry
Abstract
Before proceeding with specific computer graphics subjects, we will discuss related mathematics, which will be frequently used in this book. You can skip the first two sections of this chapter if you are familiar with vectors. After this general part, we will discuss several useful algorithms, needed for the exercises at the end of this chapter and for the topics in the later chapters. For example, Chap. 6 will present approaches on how to handle polygons that are the faces of 3D solid objects. Since polygons in general are difficult to handle, we will divide them into triangles, as discussed in Sect. 2.6.
Leen Ammeraal, Kang Zhang
Chapter 3. Geometrical Transformations
Abstract
To understand perspective projection, to be discussed in Chap. 5, we need to be familiar with 3D rotations. These and other transformations will be discussed in this chapter. They are closely related to matrix multiplication, which is the subject we start with.
Leen Ammeraal, Kang Zhang
Chapter 4. Classic 2D Algorithms
Abstract
Although programming is a creative activity, we can sometimes benefit from well-known algorithms, that provide more elegant solutions and optimizations than those we would have been able to invent ourselves. This is no different in computer graphics. This chapter presents several well-known graphics algorithms for (a) computing the coordinates of pixels that comprise lines and circles, (b) clipping lines and polygons, and (c) drawing smooth curves. These are the most primitive operations in computer graphics and should be executed as fast as possible. Therefore, the algorithms in this chapter ought to be optimized to avoid time-consuming executions, such as multiplication, division, and operations on floating point numbers.
Leen Ammeraal, Kang Zhang
Chapter 5. Perspective and 3D Data Structure
Abstract
We now turn to the exciting subject of 3D graphics. As soon as we know how to compute the perspective image of a single point, we can easily produce more interesting images. To obtain the perspective image of a straight line, we simply connect the images of its endpoints, using the fact that the image of a straight line is also a straight line. In this chapter, the computation of the perspective image of a point is done in two steps: a viewing transformation followed by a perspective transformehation.
Leen Ammeraal, Kang Zhang
Chapter 6. Hidden-Line and Hidden-Face Removal
Abstract
The previous chapter has discussed the specification of 3D objects and their perspective view in preparation for this chapter. We will now first consider line drawings of 3D objects, that engineers usually wish to use. Such line drawings typically display the lines on the back, i.e. invisible lines or hidden lines, as dashed lines. Although line drawings might look rather dull compared with colored representations of such objects, there are many technical applications for which they are desired. The first part of this chapter will discuss how to identify hidden lines and omit them in line drawings. The chapter will then describe how backfaces, i.e. invisible faces or hidden faces, could be identified by several algorithms. The viewpoint will be taken care of automatically, so that the hidden faces of an object are omitted regardless of the chosen viewpoint. Besides, a face may be only partly visible, for example, if we have two cubes, with the nearer one partly hiding the farther one. The problem of displaying only the visible portions of faces will also be solved in this chapter.
Leen Ammeraal, Kang Zhang
Chapter 7. Color, Texture, and Shading
Abstract
Making computer graphics interesting and useful for a wide range of applications, color is a complex topic and may be interpreted in the context of visual psychology, physiology, or optics. In computer graphics, we will not discuss the physical properties and principles of color, rather, we focus on how to present colors in a way that they closely match those in the nature. We will introduce the RGB (Red, Green, Blue) model and its representation inside modern computers and the alternative but also commonly used HSL (Hue, Saturation, Luminance) model. The chapter then discusses the blending approach to model the transparency effects and how texture and lighting models are implemented.
Leen Ammeraal, Kang Zhang
Chapter 8. Fractals
Abstract
There are many aspects in nature that are repeating and in many cases in patterns similar at different scales. For example, when observing a pine tree, one may notice that the shape of a branch is very similar to that of the entire tree, and the shapes of sub-branches and the main branch are also similar. Such kind of self-similar structure that occurs at different levels of magnification can be modeled by a branch of mathematics called Fractal geometry. The term fractal was coined by Benoît Mandelbrot in 1975, and means fractus or broken in Latin. Fractal geometry studies the properties and behavior of fractals. It describes many situations which cannot be explained easily by classical geometry. Fractals can be used to model plants, weather, fluid flow, geologic activity, planetary orbits, human body rhythms, socioeconomic patterns, and music, just to name a few. They have been applied in science, technology, and computer generated art. For example, engineers have been using fractals to control fluid dynamics in order to reduce process size and energy use.
Leen Ammeraal, Kang Zhang
Backmatter
Metadaten
Titel
Computer Graphics for Java Programmers
verfasst von
Leen Ammeraal
Kang Zhang
Copyright-Jahr
2017
Electronic ISBN
978-3-319-63357-2
Print ISBN
978-3-319-63356-5
DOI
https://doi.org/10.1007/978-3-319-63357-2

Neuer Inhalt