Quiz 1 Answers CMSI 371 Spring 2011 ================================================================================ 1. The default projection matrix is the identity matrix. glOrtho(-1, 1, -1, 1, 1, -1) produces it. 2. void mySolidHotDog(GLUquadricObj* quadric, GLdouble width, GLdouble length, GLint slices, GLint stacks) { glPushMatrix(); gluCylinder(quadric, width/2, width/2, length-width, slices, stacks); glutSolidSphere(width/2, slices, stacks); glTranslated(0, 0, length-width); glutSolidSphere(width/2, slices, stacks); glPopMatrix(); } 3. (a) It would look the same size. The distance from the soccer ball's center to the frustum's boundaries in unchanged because with gluPerspective, the field of view angle is constant. (b) It would look smaller. The distance from the soccer ball's center to the frustum's boundaries increases since you are taking a projection plane of a fixed size and moving it closer to the eye point. 4. If you didn't specify stacks (in effect assuming only one) then there would be no vertices except at the tip of the cone and on its base. Lighting computations are only done at vertices, so you would never see a highlight or spotlight effect on the surface of a cone without placing vertices there. 5. When you hit the y-axis. the view is not unique. You are looking along the up-vector. This may or may not crash with a division by zero. Even if you are okay, you will get some weird flipping of the house as you cross the y-axis, which is visually jarring.