CS 450 Intro to Computer Graphics
An advantage of using orthographic projection instead of perspective is: It allows for transformations It draws using better colors It gives a more realistic view It helps in lining things up
It helps in lining things up
An OpenGL spot light Shines equally in all directions Shines using parallel rays of light Only shines in a specific direction
Only shines in a specific direction
In the Additive color scale: G+Y = B R+G = Y R+B = Y B+Y = C
R+G = Y
When OpenGL lighting computations are performed, the actual position of the light that is used is Whatever was given in the "glLightfv( GL_LIGHT0, GL_POSITION,..." call Whatever was given in the "glLightfv( GL_LIGHT0, GL_POSITION,..." call times the Projection matrix Whatever was given in the "glLightfv( GL_LIGHT0, GL_POSITION,..." call times the Projection*ModelView matrix Whatever was given in the "glLightfv( GL_LIGHT0, GL_POSITION,..." call times the ModelView matrix
Whatever was given in the "glLightfv( GL_LIGHT0, GL_POSITION,..." call times the ModelView matrix
The double buffers' roles are switched by calling glutSwapBuffers glSwapBuffers glSwitchBuffers glutSwitchBuffers
glutSwapBuffers
The GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T texture parameters tell OpenGL what to do when: When s and t are undefined s or t is < 0. or > 1. When s or t is > 0. and < 1. Always
s or t is < 0. or > 1.
A texture image has MxN pixels (texels). OpenGL treats its dimensions in s and t as: N x M M x N 1. x 1. 1. x (N/M)
1. x 1.
If, in a framebuffer, the green component is stored using 6 bits, the number of shades of green that are possible is: 16 64 4 256
64
A "callback" function, used in the graphics programming sense, is: A function that gets called when a particular event or situation occurs A function that is called when the graphics card is available A function that gets called when the graphics card finishes drawing your display A function that gets called to reset the graphics card if it becomes stuck
A function that gets called when a particular event or situation occurs
An OpenGL object's vertices cannot be defined in A string A for-loop A function A while-loop
A string
A "viewport" is: Another name for the entire graphics window A sub-region of the overall graphics window The region on the monitor that is outside the graphics window
A sub-region of the overall graphics window
The reason triangle strips are very efficient is: Triangles can be non-planer After the first triangle, each subsequent triangle only needs a single vertex to define it Triangles can be non-convex After the first quadrilateral, each subsequent quadrilateral only needs a single vertex to define it
After the first triangle, each subsequent triangle only needs a single vertex to define it
Transformations are: Commutative Neither Associative nor Commutative Associative Both Associative and Commutative
Associative
The default way that OpenGL views a 3D scene is by placing the eye: At the origin, looking in +X At the origin, looking in -Z At the origin, looking in -X At the origin, looking in +Z
At the origin, looking in -Z
If you setup the Texture Transformation to scale by 2.0, the appearance of the texture image on the object will differ by: The image will remain the same size Being scaled by 2.0 Trick question -- there is no Texture Transform in OpenGL Being scaled by 0.5
Being scaled by 0.5
A pure red light shines on a pure green object. The resulting object coloring is: Red Black White Yellow Green
Black
In the Subtractive color scale C+M = B B+Y = G Y+C = B R+G = Y
C+M = B
The purpose of a {Depth,Z,Zed}-Buffer is to Correctly display near objects so they appear to be in front of far objects To provide storage for more than one set of colors per pixel To provide deep hues of a color To allow more color bits per pixel
Correctly display near objects so they appear to be in front of far objects
The framebuffer's Z-buffer is used to hold: Output to the Video Driver Depth Which double-buffered framebuffer you are using Refresh duration
Depth
Joe Graphics wrote the following code: glBegin( GL_LINE_STRIP );for( float angle = 0.; angle <= 360.; angle += 10. ){ float x = Radius * cos( TO_RADIANS( angle ) ); float y = Radius * sin( TO_RADIANS( angle ) ); glVertex2f( x, y );}glEnd( ); What is he trying to do? Drawing a 2D filled-in circle Nothing -- this is not legal OpenGL Drawing a graph of a sine function Drawing a 2D circle outline
Drawing a 2D circle outline
In Texture Mapping, the OpenGL program specifies s and t coordinate values at: Each pixel Each vertex Each triangle Each texel
Each vertex
OpenGL shading can be specified as: Flat only for quads Flat or smooth Smooth only for triangles
Flat or smooth
The texture environment setting of GL_MODULATE differs from GL_REPLACE by: GL_MODULATE alters the surface geometry GL_MODULATE allows the underlying color of the surface to shine up through the texture GL_REPLACE allows the underlying color of the surface to shine up through the texture They are different names for the same thing
GL_MODULATE allows the underlying color of the surface to shine up through the texture
What is it called when we specify an XYZ position with 4 elements? HomoSapiens coordinates Himalayan coordinates Homogeneous coordinates Humongous coordinates
Homogeneous coordinates
In HSV color, the letters H-S-V stand for: Highlighting-Salience-Vector Highlighting-Saturation-Valence Hue-Saturation-Value Hue-Salience-Viscosity
Hue-Saturation-Value
The Texture Map parameter value GL_NEAREST tells OpenGL to: If a pixel doesn't fall on an exact texel, interpolate from the 4 surrounding texels Always use white Always use black If a pixel doesn't fall on an exact texel, grab the nearest texel
If a pixel doesn't fall on an exact texel, grab the nearest texel
The Texture Map parameter value GL_LINEAR tells OpenGL to: Always use black Always use white If a pixel doesn't fall on an exact texel, interpolate from the 4 surrounding texels If a pixel doesn't fall on an exact texel, grab the nearest texel
If a pixel doesn't fall on an exact texel, interpolate from the 4 surrounding texels
The topology to use when drawing a list of vertices in OpenGL is specified: In the glBegin call In the glSetTopology call In the glColor3f call In each glVertex3f call
In the glBegin call
An advantage of using perspective projection instead of orthographic is: It allows for transformations It helps in lining things up It gives a more realistic view It draws using better colors
It gives a more realistic view
The Specular lighting depends on the location of the point you are lighting, plus: Light location, Eye position Surface normal, Eye position Light location, Surface normal, Eye position None of these -- it's a constant Light location, Surface normal
Light location, Surface normal, Eye position
The difference between Model Coordinates and World Coordinates is: They use different units There is no difference MC are the original object coordinates, WC have been transformed into the scene WC are the original object coordinates, MC have been transformed into the scene
MC are the original object coordinates, WC have been transformed into the scene
The purpose of a Z-buffer (or Depth-buffer, or Zed-buffer) is to: Calculate z values at each pixel for upload to the CPU Make 3D objects in front hide 3D objects in back Make 3D objects in back hide 3D objects in front Hold z values at each pixel that are downloaded from the CPU
Make 3D objects in front hide 3D objects in back
An OpenGL surface normal can be given: Per-face or per-vertex Per-face only Per-vertex only
Per-face or per-vertex
In OpenGL color, which of these is true? Blue + Red = Cyan Red + Green + Blue = light green Green + Blue = Magenta Red + Green = Yellow
Red + Green = Yellow
The argument to glBegin( ) specifies: The geometry The topology The transformation The color
The topology
The purpose of texture objects and texture binding is: To allow textures to stay resident in GPU memory and not need to be downloaded from CPU memory each time they are used The keep the texture information in a single CPU memory data structure To allow the texture to be used with multiple geometric objects To compress the texture image
To allow textures to stay resident in GPU memory and not need to be downloaded from CPU memory each time they are used
The purpose of double-buffering is To smoothly interpolate 2 animation frames To be sure the viewer doesn't see an incomplete scene To subtract 2 pixel-images To allow 2 applications to do graphics simultaneously
To be sure the viewer doesn't see an incomplete scene To subtract 2 pixel-images
A use for specifying an XYZ using 4 elements is To specify a point at infinity To subtract a common value from all coordinates To specify a point at the origin To include a checksum
To specify a point at infinity
What is the general idea behind Texture Mapping? To stretch an image over a piece of geometry To get more colors onto a surface than you normally could To add translucency to a surface To add a bumpy, or rough, appearance to a surface
To stretch an image over a piece of geometry
If Joe Graphics programs these lines of code: glRotatef( 45., 1., 0., 0. );glTranslatef( 1., 2., 3. ); followed by drawing something, he is trying to: Translate, then rotate that object The order actually doesn't matter Rotate, then translate that object
Translate, then rotate that object
Alpha values are used for HSV-to-RGB conversion Transparency Depth-buffering RGB-to-HSV conversion
Transparency
The framebuffer's Alpha value is used to specify: Intensity Saturation Transparency Lightness
Transparency
What order do these appear in the shader-enabled graphics pipeline? * Fragment shader * Rasterizer * Vertex shader Rasterizer, Vertex, Fragment Vertex, Rasterizer, Fragment Fragment, Vertex, Rasterizer Vertex, Fragment, Rasterizer Fragment, Rasterizer, Vertex Rasterizer, Fragment, Vertex
Vertex, Rasterizer, Fragment
A "Display List" is: Sending the display instructions directly to the graphics system A list of the available monitors attached to your system A list of the available graphics cards for your system Writing display instructions into memory to be played back later
Writing display instructions into memory to be played back later
In the glRotatef( ) function call, the angle is given in units of: degrees steradians radians
degrees
The (r,g,b) output from the Fragment shader is in the variable: gl_FragColor gl_Color gl_FragColor3f gl_Color3f
gl_FragColor
The (x,y,z) output from the Vertex shader is in the variable: gl_Vertex3f gl_Vertex gl_Position gl_Position3f
gl_Position
The (x,y,z) input to the Vertex shader is in the variable: gl_Position3f gl_Vertex3f gl_Vertex gl_Position
gl_Vertex
The input and output variables in the Vertex shader are of type: vec4f vec4 vec3f vec3
vec4
The output from the Fragment shader is of type: vec4 vec4f vec3 vec3f
vec4