BSCS Bachelor of Science in Computer Science: Computer Graphics Fundamentals Questions 3 — Questions and Answers
Question 1: What does the view frustum in 3D graphics define?
- The polygon budget per frame
- The region of 3D space visible to the camera (Correct answer)
- The field of diffuse lighting
- The mipmap level selection range
Correct answer: The region of 3D space visible to the camera
The view frustum is the truncated pyramid-shaped volume that contains all geometry potentially visible from the camera.
Question 2: Which algorithm efficiently clips a line segment to a rectangular window?
- Sutherland-Hodgman
- Cohen-Sutherland (Correct answer)
- Bresenham's algorithm
- Scanline fill
Correct answer: Cohen-Sutherland
The Cohen-Sutherland algorithm assigns region codes to line endpoints and uses them to trivially accept, reject, or clip line segments against a window.
Question 3: In ray tracing, what is a 'shadow ray' used for?
- Casting ambient occlusion
- Determining whether a surface point is occluded from a light source (Correct answer)
- Computing reflected ray directions
- Sampling environment maps
Correct answer: Determining whether a surface point is occluded from a light source
A shadow ray is cast from a surface hit point toward each light source to test for occlusion and determine if the point is in shadow.
Question 4: What is texture magnification in OpenGL/WebGL?
- Increasing texture resolution at runtime
- Mapping a texture to a surface area larger than the texture itself (Correct answer)
- Generating mipmaps on the GPU
- Compressing texture data for faster transfer
Correct answer: Mapping a texture to a surface area larger than the texture itself
Texture magnification occurs when a texture is stretched across a surface larger than its resolution, requiring filtering to avoid blocky artifacts.
Question 5: Which interpolation method does bilinear filtering use to sample a texture?
- Nearest-neighbor lookup from the closest texel
- Weighted average of the four nearest texels (Correct answer)
- Cubic spline through 16 surrounding texels
- Trilinear blend across two mipmap levels
Correct answer: Weighted average of the four nearest texels
Bilinear filtering computes a weighted average of the four nearest texels based on the fractional position within the texel grid.
Question 6: What is the primary purpose of normal mapping in real-time rendering?
- Increasing polygon count for detail
- Simulating surface detail by perturbing normals without adding geometry (Correct answer)
- Storing pre-baked ambient occlusion data
- Encoding vertex positions in texture space
Correct answer: Simulating surface detail by perturbing normals without adding geometry
Normal mapping stores per-texel surface normals in a texture to simulate fine geometric detail during lighting calculations without additional polygons.
Question 7: What does the painter's algorithm do to handle visibility?
- Uses a depth buffer per pixel
- Renders objects back-to-front, overpainting closer ones on top (Correct answer)
- Sorts pixels by color value
- Subdivides polygons until non-overlapping
Correct answer: Renders objects back-to-front, overpainting closer ones on top
The painter's algorithm sorts polygons by depth and draws them back-to-front, with nearer polygons overwriting farther ones, mimicking a painter's technique.
What does the view frustum in 3D graphics define?