Docsity

Midterm Exam Questions - Computer Graphics (ECSE-4750) - Fall 2005, Exams of Computer Graphics

Toggle sidebar
bg1
NAME______________________________________ RIN________________
EMAIL______________
Midterm Exam -Computer Graphics
(ECSE-4750) - Fall 2005
Total: 18 questions on 4 pages
1. (1 pt) Rotate the point (2,1,3) by 90 degrees about the axis
(4,2,6).
(2,1,3)
2. (1 pt) How do you exchange info with a callback function,
beyond what is provided for in the specified argument list?
External variables
3. (1 pt) Why does OpenGL have triangle strips and fans in
addition to triangles?
Efficiency
4. (2 pt) Consider this sequence of calls:
glColor3f(1.,1.,1.);
glVertex3f(1.,1.,1.);
glVertex3f(2.,2.,3.);
glColor3f(0.,1.,1.);
What color is the vertex (1,1,1)?
(1,1,1)
What color is the vertex (2,2,3)?
(1,1,1)
pf3
pf4
pf5

Partial preview of the text

Download Midterm Exam Questions - Computer Graphics (ECSE-4750) - Fall 2005 and more Exams Computer Graphics in PDF only on Docsity!

NAME______________________________________ RIN________________

EMAIL______________

Midterm Exam -Computer Graphics

(ECSE-4750) - Fall 2005

Total: 18 questions on 4 pages

  1. (1 pt) Rotate the point (2,1,3) by 90 degrees about the axis (4,2,6). (2,1,3)
  2. (1 pt) How do you exchange info with a callback function, beyond what is provided for in the specified argument list? External variables
  3. (1 pt) Why does OpenGL have triangle strips and fans in addition to triangles? Efficiency
  4. (2 pt) Consider this sequence of calls: glColor3f(1.,1.,1.); glVertex3f(1.,1.,1.); glVertex3f(2.,2.,3.); glColor3f(0.,1.,1.); What color is the vertex (1,1,1)? (1,1,1) What color is the vertex (2,2,3)? (1,1,1)
  1. (3 pt) Imagine a perspective projection with the center of projection at (0,0,0), and the projection plane at Y=1. Where do the following points project to: (0,1,2), (1,2,3), (2,3,4)? (0,1,2) (1/2,1,3/2) (2/3,1,4/3)
  2. (1 pt) What's the point of using two color buffers, one to draw into, while the other is being displayed? To avoid display flickering when drawing complex views which takes longer to refresh.
  3. (3 pt) Convert these homogeneous points to Cartesian: (0,1,3,2), (2,1,3,4), (2,4,3,5). (0,1/2,3/2),(1/2,1/4,3/4),(2/5,4/5,3/5)
  4. (2 pt) Give the 4x4 homogeneous matrix for a translation by (2,1,3). |1 0 0 2| |0 1 0 1| |0 0 1 3| |0 0 0 1|
  5. (2 pt) What's the quaternion for a 90 degree rotation about the Y axis? Assume that sin 45 = cos 45 = 0.7. 0.7+0.7j
  6. (1 pt) How do you do a rotation about an axis that does not go thru the origin? Translate -> Rotate -> Translate
  7. (1 pt) Quaternion math: What is i * (2i+j+3k)?
  1. (1 pt) How many different colors could we display at any one time? 2048*2048 = 2^
  2. (1 pt) If 240 megabytes/second can be transferred, how much time (in seconds) will it take to load the frame buffer? 2048204824/(24082^20) = 0.05s
  3. (1 pt) What would the maximum frame rate (frames per second) be in this case? 1/(2048204824/(24082^20)) = 20fps
  4. (1 pt) Give an example when an object that a programmer creates would not appear in the final scene. 1.out of viewing volume 2.blocked by other object
  5. (2 pt) How does the following code guarantee the correctness of the resize process? void myReshape(int w, int h) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); /* switch matrix mode / glLoadIdentity(); if (w <= h) gluOrtho2D(-2.0, 2.0, -2.0 * (GLfloat) h / (GLfloat) w, 2.0 * (GLfloat) h / (GLfloat) w); else gluOrtho2D(-2.0 * (GLfloat) w / (GLfloat) h, 2.0 * (GLfloat) w / (GLfloat) h, -2.0, 2.0); glMatrixMode(GL_MODELVIEW); / return to modelview mode */ } By making the viewport and world window have the same aspect ratio.
  6. (2 pt) Alpha is a scalar whose value is 2, v1 and v2 are two vectors and v1 = (1,2), v2 = (3,5). What is the value of v = v1+alphav2? v = (1,2) +2(3,5)
  1. (2 pt) Show by counterexample that it is not always true that for 3D vectors a,b and c, a(bc) = (ab)c, where * is the vector cross product. (1,2,3), (1,1,1), (2,2,2)