





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 9
This page cannot be seen from the preview
Don't miss anything!
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?
Suppose we have a frame buffer with
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?
In this problem, we use this perspective projection:
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 #2, Display Hardware (12 pts) 2
| Winding Rule | Parity Rule | Non exterior | Winding Rule | Parity Rule| | 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.
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)
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)
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.
(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 8