Introduction 1 Flashcards
What are the major areas of computer graphics?
Modelling Rendering Animation User interaction Virtual reality Visualization Image processing 3D scanning Computational photography
Define modelling
deals with the mathematical specification of shape and appearance properties in a way that can be stored on the computer. For example,
a coffee mug might be described as a set of ordered 3D points along with some interpolation rule to connect the points and a reflection model that describes how light interacts with the mug.
Define rendering
a term inherited from art and deals with the creation of
shaded images from 3D computer models
Define animation
a technique to create an illusion of motion through sequences of images. Animation uses modeling and rendering but adds the key issue of movement over time, which is not usually dealt with in basic modeling and rendering
Define user interaction
deals with the interface between input devices such as mice and tablets, the application, feedback to the user in imagery, and other sensory feedback. Historically, this area is associated with graphics largely because graphics researchers had some of the earliest access to the input/output devices that are now ubiquitous.
Define virtual reality
attempts to immerse the user into a 3D virtual world. This typically requires at least stereo graphics and response to head motion. For true virtual reality, sound and force feedback should be provided as well. Because this area requires advanced 3D graphics and advanced display technology, it is often closely associated with graphics.
Define visualization
attempts to give users insight into complex information via visual display. Often there are graphic issues to be addressed in a visualization problem.
Define Image processing
deals with the manipulation of 2D images and is used in both the fields of graphics and vision.
Define 3D scanning
uses range-finding technology to create measured 3D models. Such models are useful for creating rich visual imagery, and the processing of such models often requires graphics algorithms.
Define computational photography
the use of computer graphics, computer vision, and image processing methods to enable new ways of photographically capturing objects, scenes, and environments
What’s a key part of using graphics libraries?
A key part of using graphics libraries is dealing with a graphics API.
Define an API
An application program interface (API) is a standard collection of functions to perform a set of related operations
Define a graphics API
a set of functions that perform basic operations such as drawing images and 3D surfaces into windows on the screen.
Every graphics program needs to be able to use…
two related APIs:
a graphics API for visual output and
a user-interface API to get input from the user.
There are currently two dominant paradigms for graphics and user-interface APIs…
The first is the integrated approach, exemplified by Java, where the graphics and user interface toolkits are integrated and portable packages that are fully standardized and supported as part of the language.
The second is represented by Direct3D and OpenGL.
geometric manipulation used in the graphics pipeline can be accomplished almost entirely in a….
4D coordinate space composed of three traditional geometric coordinates and a fourth homogeneous coordinate that helps with perspective viewing.
These 4D coordinates are manipulated using 4 × 4 matrices and 4-vectors.
The graphics pipeline, therefore, contains much machinery for efficiently processing and composing such matrices and vectors.
Infinity operations
\+a/(+∞) = +0 −a/(+∞) = −0 \+a/(−∞) = −0 −a/(−∞) = +0 ∞ + ∞ = +∞ ∞−∞ = NaN ∞×∞ = ∞ ∞/∞ = NaN ∞/a = ∞ ∞/0 = ∞ 0/0 = NaN \+a/ +0 = +∞ −a/ +0 = −∞
A reasonable approach to making code fast is to proceed in the following order, taking only those steps which are needed:
- Write the code in the most straightforward way possible. Compute intermediate results as needed on the fly rather than storing them.
- Compile in optimized mode.
- Use whatever profiling tools exist to find critical bottlenecks.
- Examine data structures to look for ways to improve locality. If possible, make data unit sizes match the cache/page size on the target architecture.
- If profiling reveals bottlenecks in numeric computations, examine the assembly code generated by the compiler for missed efficiencies. Rewrite source code to solve any problems you find.
What are the basic classes for designing and coding graphics programs
Vector2. Vector3 Hvector RGB Transform Image
Describe a vector2 class’ purpose and functionality
A 2D vector class that stores an x- and y-component. It should store these components in a length-2 array so that an indexing operator can be well supported. You should also include operations for vector addition, vector subtraction, dot product, cross product, scalar multiplication, and scalar division.
Describe a vector3 class’ purpose and functionality
A 3D vector class analogous to vector2.
Describe a hvector class’ purpose and functionality
A homogeneous vector with four components (see Chapter 7).
Describe a RGB class’ purpose and functionality
An RGB color that stores three components. You should also include
operations for RGB addition, RGB subtraction, RGB multiplication, scalar
multiplication, and scalar division.
Describe a Transform class’ purpose and functionality.
A 4 × 4 matrix for transformations. You should include a
matrix multiply and member functions to apply to locations, directions, and surface normal vectors. As shown in Chapter 6, these are all different.