Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 184, Fall 1996 Midterm Exam #1: Topics in Computer Graphics, Exams of Computer Graphics

A midterm exam from the university of california, berkeley's cs 184 course, which covers topics in computer graphics. The exam includes questions on transformations, display hardware, vanishing points, sample point algorithms, and scan conversion. Students are expected to answer questions related to rotations, scalings, and the behavior of pixels in different contexts.

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shamabhat_84
shamabhat_84 🇮🇳

80 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 184, Fall 1996
Midterm #1
Professor: unknown
Problem #1, Transformations (8pts)
All questions assume a right handed coordinate system.
Circle the correct answer: (2 pts each)
a) In 3 space, two rotations about arbitrary axes can alaways be applied in either order to get the same result.
True / False
b) In 3-space, two rotations about principal axes can always be applied in either order to get the same result.
True / False
c) In 3-space, two uniform scalings (scaling with different scale factors in x, y, and z) can always be applied in either order to get
the same result.
True / False
Short answer: (2 pts each)
d) In a right handed coordinate system, in what direction does the positive y-axis point after a 90 degree rotation around the positive
x-axis?
Problem #2, Display Hardware (12 pts)
Suppose we have a frame buffer with
x x y pixelsn bit planes for an index into the color tablew bits for each of red, green, and blue in the color table
CS 184, Midterm Exam #1, Fall 1996
CS 184, Fall 1996Midterm #1Professor: unknown 1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download CS 184, Fall 1996 Midterm Exam #1: Topics in Computer Graphics and more Exams Computer Graphics in PDF only on Docsity!

CS 184, Fall 1996

Midterm

Professor: unknown

Problem #1, Transformations (8pts)

All questions assume a right handed coordinate system.

Circle the correct answer: (2 pts each)

a) In 3 space, two rotations about arbitrary axes can alaways be applied in either order to get the same result.

True / False

b) In 3-space, two rotations about principal axes can always be applied in either order to get the same result.

True / False

c) In 3-space, two uniform scalings (scaling with different scale factors in x, y, and z) can always be applied in either o the same result.

True / False

Short answer: (2 pts each)

d) In a right handed coordinate system, in what direction does the positive y-axis point after a 90 degree rotation aroun x-axis?

Problem #2, Display Hardware (12 pts)

Suppose we have a frame buffer with

  • x x y pixels
  • n bit planes for an index into the color table
  • w bits for each of red, green, and blue in the color table

CS 184, Fall 1996Midterm #1Professor: unknown 1

MAKE NO ASSUMPTIONS ABOUT THE RELATIVE MAGNITUDES OF x, y, n, AND w.

a) How many colors can we choose from for our color table?

b) What is the maximum number of different colors we can have in our color table at one time?

c) What is the maximum number of different colors that can be displayed on our screem at one time?

Problem #3, Vanishing Points (18 pts)

In this problem, we use this perspective projection:

  • The eye is at the point z=1 on the z-axis: COP = (0,0,1).
  • The projection plane is at z=2: VRP = (0,0,2).
  • The up vector is along the y-axis: VUP = (0,1,0).
  • The view window is from (-1,-1) to (1,1).

a) What is the vanishing point for the family of lines: p 0 + t (1,1,1)?

b) Describe the set of lines whose vanishing point is ( x , y ,2.

c) what is the 4x4 matrix that will compute this projection? (You may express this as a product of 4x4 matrices if you p

Problem #4, is nonexistant

Problem #2, Display Hardware (12 pts) 2

| Region A | Region B |

| Winding Rule | Parity Rule | Non exterior | Winding Rule | Parity Rule| | in/out/? | in/out/? | in/out/? | in/out/? | in/out/? |


| | | in | | |

| | | out | | |

| in | | | | |

| out | | | | |

| | in | | | |

| | out | | | |

In this figure, we see a window divided into four regions labeled with their winding numbers. Draw in the rest of the co outside the window in a way consistent with the given winding numbers.

Here, the numbering on the test stops. For simplicity, I will just give questions without numbers the numbers they presumably should have.

Problem #7, Scan Converting Lines, Circles, and Ellipses and misc Hardware

Figure 1: Line scan conversion question

Problem #6, Interior and Exterior of Polygons (16 pts) 4

Scan Converting Lines, Circles, and Ellipses and misc Hardware

Figure 1 (A) shows a pixel grid, with a pixel marked; this pixel lies on a line with slope 0 and 1. Which pixel in could lie on this line? (1)

  • In a line scan conversion algorithm, how does one choose which of these pixels to mark? (2) While it is usual to look ahead one pixel in scan conversion, it is not possible to look ahead by two pixels; this fact that a pattern of three consecutive pixels does not occur in a line with slope between 0 and 1/2. Mark this p grid. (2)
  • Name one advantage and one disadvantage of looking ahead two pixels. (2) Pigure 1 (B) shows a pixel grid, with a pixel marked. This pixel lies in the octant 0 <=less than or equal to x <= R a circle of radius R; which pixels in column (b) could lie in this octant of this circle? (2)

Figure 1 (C) shows a pixel grid, with two vertices marked; there is a clip boundary given in dashed lines. Mark endpoint obtained by clipping the line from v1 to v2 against this clip boundary, and assuming that the pixels lie intersection of coordinate lines, mark the pixels that would be set on by scan-converting the line from this endp (2)

Recall that pixels that lie on a clip boundary are, by convention, inside the clip region. Compare the set of pixe when the line is clipped, then scan-converted with those obtained when the line is scan-converted, and then the outside the clip boundary thrown away -- is there a problem? How could this be avoided? (3)

  • Mark all the pixels in circle of radius two pixels, whose center lies on the pixel shown in figure 1 (D). (3)
  • Scan converting an axis aligned ellipse is less efficient that scan converting a circle; why? (2)
  • Scan converting a general ellipse is more difficult that scan converting an axis aligned ellipse; why? (2)
  • Commonly, 8 bit per pixel framebuffers have color tables, but 24 bit per pixel framebuffers do not. Why is this Honest Sid's Pre-owned Computers offers a workstation that has 1000 by 1000 pixels, and its monitor is refres a second. A salesman assures you that the display memory is conventional static Ram (access times for RAM r 50-80 ns) and that pixels are read out of memory three pixels at a time by the display hardware. What is the dis buying this computer? (2)

Problem #8, Scan Conversion (25 points)

In the figure below, the gray areas represent a dense concentration of edges of a single, very degenerate polygon. You c how many edges there are within that region, nor the direction of them. There are six edges we are sure of -- these are bold with the directions specified. There are three topologically distinct regions we care about, A, B, and C. Each label 7.2 and 7.3 is worth 2 points for a correct answer, -1 point for a wrong answer (we'll mark "2/-1 points"), and 0 points i This is so that a random guessing strategy will, on average, yield 0 overall points.

Problem #7, Scan Converting Lines, Circles, and Ellipses and misc Hardware 5

| 1 0 0 rt(3) | | 0 1 1 1/2 | | 0 0 1 rt(2) | | 0 0 0 1 |

(9.2) (5 pts) Some of the transformations on #D points that are useful in graphics can be represented as simple 3 x 3 ma transformations in R^3 , that is, y=Ax where x and y are in R^3 , and A is in R3x3. Some other useful transformations are n operations in R^3 , and thus cannot be represented by a 3x3 matrix. However, by using homogeneous coordinates, everal non-linear transformations can be represented by 4x4 matrices. For each type of transformation below, write whether it and can be represented as a 3x3 matrix, or homogeneous if it requires a 4 x 4 matrix and homogeneous coordinates.

  • Translation
  • Rotation about the z axis
  • Perspective projection
  • Scaling, leaving the origin fixed
  • Rotation about an axis not passing through the origin

(9.3) (7 pts) Derive transformation that rotates points about the axis going from (1,0,0) to (2,1,0) by angle ALPHA. Yo your answer either as a 4x4 column vector homogeneous transformation matrix, or in terms of the transformations T(x, Rx(THETA), Ry(THETA), and Rz(THETA) as discussed in the book.

(9.4) (8 pts) You are writing a simple GL program to experiment with its viewing transformation commands, translate( rotate(angle,axis). The program you begin with includes a C function, drawcube(), that draws a tiny cube, with sides of centered about the origin. The program also draws the coordinate axes and three circles in the x-z plane, with radii 2, 3 drawcube() function produces the following small cube:

drawcube();

The program also includes a funtion called drawcubecircle() that draws twelve cubes in a circle using the GL translate( commands as shown below. Note that the rotate(int angle, char axis) command expectsits angle in tenths of degrees, so rotate(300,'y') rotates thirty degrees about the y axis.

Problem #9, Transformations (25 points) 7

void drawcubecircle() { int i;

for (1=o;i

Write a new function, called drawcubetorus(), that uses the same sorts of techniques as in drawcubecircle(), to produce following figure. The inenr radius of the torus is 2, the outer radius is 4, and the torus consists of twelve rings of radius eighteen cubes each.

void drawcubetorus() { /* write your code here */

Problem #10, Projection and Perspective

Problem #10, Projection and Perspective 8