• Home
  • Textbooks
  • Invitation to Computer Science
  • Computer Graphics and Entertainment: Movies, Games, and Virtual Communities

Invitation to Computer Science

G.Michael Schneider, Judith Gersting

Chapter 16

Computer Graphics and Entertainment: Movies, Games, and Virtual Communities - all with Video Answers

Educators


Chapter Questions

24:49

Problem 1

Locate sources describing the graphics pipeline of Figure 16.2 in greater detail. (A good place to start is the "Graphics Pipeline" entry at Wikipedia .org.) How many distinct steps are included in these versions of the pipeline? Which ones that are included were omitted in this chapter, and what operations do these missing steps perform? Write a report giving an overview of these more complete treatments of the sequence of steps involved in computer graphics.

Jennifer Stoner
Jennifer Stoner
Numerade Educator
00:49

Problem 2

Given the triangular model of a two-dimensional object shown here:
write a vertex list representation of this model. Because you are working in two dimensions rather than three, your vertex list will only have $(x, y)$ coordinates rather than $(x, y, z)$. Assume vertex $v_1$ is the origin.

Lauren Shelton
Lauren Shelton
Numerade Educator
01:15

Problem 3

a. Assume the matrix multiplication of Figure 16.6 requires a total of 28 arithmetic operations-floating-point additions and multiplications. If we want to move (i.e., translate) a wireframe representation of an object containing 100,000 vertex points, and if that motion takes 10 seconds to complete, how many arithmetic operations in total does a computer need to perform to implement that movement?
b. If your GPU can execute 50 million floatingpoint operations per second, how long will it take the processor to complete this translation operation?

Narayan Hari
Narayan Hari
Numerade Educator
01:15

Problem 4

Assume a polygon mesh contains 250,000 vertices. If a single matrix multiplication requires 28 floatingpaint operations, how fast a GPU is needed (floatingpaint operations per second) to produce real-time graphics at the rate of 30 frames per second?

Narayan Hari
Narayan Hari
Numerade Educator
02:31

Problem 5

Here is the vertex list for a two-dimensional wireframe triangular model:
\begin{tabular}{cccll}
\multirow{2}{*}{ (Origin) } & Vertex $x$ & $y$ & Connected to \\
$v 1$ & 0 & 0 & $v 2, v 3, v 4$ \\
$v 2$ & 0 & 1 & $v 1, v 4$ \\
$v 3$ & 1 & 0 & $v 1, v 4, v 5$ \\
$v 4$ & 1 & 1 & $v 1, v 2, v 3, v 5$ \\
$v 5$ & 1.6 & 0.5 & $v 3, v 4$
\end{tabular}
Draw the two-dimensional figure modeled by this vertex list.

P Krishnamurthy
P Krishnamurthy
Numerade Educator

Problem 6

We want to animate the movement of the object in Exercise 2 from its current location at $(0,0,0)$, the coordinates of $\mathrm{v}_1$, to the point $(3,5,0)$. The motion lasts for a total of 2 seconds. Show the translation matrix that accomplishes this motion. That is, show the matrix that, when reapplied 30 times each second for a total of 2 seconds, will produce the desired ending position.

Check back soon!
01:15

Problem 7

Assume you are working in two, rather than three, dimensions. Determine the four entries of the $2 \times 2$ rotation matrix that will take a vertex point located at position $(x, y)$ and rotate it counterclockwise around the origin by an angle $\emptyset$. The rotation is shown here: (Hint: You will need to use some trigonometric functions to accomplish this.)

Raj Bala
Raj Bala
Numerade Educator
02:45

Problem 8

Again assume you are working in two, rather than three, dimensions. Determine the four entries of the $2 \times 2$ reflection matrix that takes a vertex point at position $(x, y)$ and reflects it around the $y$-axis. That is, assume the mirror line in Figure $16.5(\mathrm{c})$ is the $y$-axis. This reflection operation is shown here:

Charles Carter
Charles Carter
Numerade Educator
02:31

Problem 9

Shown on the next page is an image of a human arm, from shoulder to hand. It has three control points labeled A, B, and C. Describe what type of motion might require the use of each of these three control points. Using these three control points, describe informally how you might animate the motion of an arm raising a glass held in the hand up to a figure's mouth.

Sheh Lit Chang
Sheh Lit Chang
University of Washington
03:07

Problem 10

Would a flight simulator package used to teach pilots to fly an airplane be a real-time graphical environment? Explain your answer.

Sharon Edamala
Sharon Edamala
Numerade Educator
04:42

Problem 11

The next diagram shows a single triangular face in the wireframe representation of an object. The three vertices of the triangle are labeled $v_1, v_0$, and $v_3$, and each has been assigned a color, either red, blue, or green.

The vertex color is stored as a three-tuple, with each entry an integer in the range 0 to 255, representing the contribution of the components red, green, and blue, respectively. (Note: This is identical to the RGB color model introduced in Chapter 4, Section 4.2.2, page 171.) So, for example, the color red is represented by the three-tuple $(255,0,0)$. Purple, an equal mix of red and blue, would be represented as $(128,0,128)$.
$\mathrm{Rec}$
$(0,0,255)$
Blue
During the rendering phase, a computer must shade in the entire triangular face, according to the colors assigned to each of the three vertices. Describe an algorithm that would do color shading and blending of the triangular face in a visually attractive manner.

AG
Ankit Gupta
Numerade Educator
View

Problem 12

You are given the three-dimensional coordinates of a point $P 1\left(x_1, y_1, z_1\right)$ and a point P2 $\left(x_2, y_2, z_2\right)$. You are also given the coordinates of the location point of a viewer $\left(x_y, y_y, z_y\right)$. You may assume that $P 1$ and $P Q$ are located on the same side of the viewer. Describe informally (you do not need to write out an algorithm) exactly how to determine if, from the point of view of the viewer, it is possible to see both points P1 and P2, or if one of these points is obstructed and not visible. In the latter case, describe how you can determine which is the occluded point.

Victor Salazar
Victor Salazar
Numerade Educator
02:31

Problem 13

The following diagram contains a circle of radius 1 with its center at the origin $(0,0)$. There is a mirror line parallel to the $y$-axis located at the point $x=-2$. For each of the following pairs of operations, describe the final result after each of the two pairs of motions has been completed, one at a time:
a. Translate the circle along the $x$-axis by +2 units. Reflect the circle around the mirror line.
b. Reflect the circle around the mirror line. Translate the circle along the $x$-axis by +2 units.
c. Reflect the circle around the mirror line. Reflect the circle around the mirror line.

Kristen Karbon
Kristen Karbon
Numerade Educator