


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Tuesday 5 October 2004
Problem 1: Image formats (18 pts)
A ray tracer computes and stores its image using this data structure to hold each pixel in the final image:
public class RGBColor { double r; double g; double b; }
The image needs to be stored to an output file format that uses 8-bit RGB, gamma corrected for γ = 2. 2.
Problem 2: Ray Tracing Bugs (24 pts)
For each of the following bugs, give a simple test case that would catch the bug. Also describe how the image will be different, both visually and numerically, from the correct image.
vR = vL + 2((n · vL)n − vL)
where vL is the unit vector pointing toward the light and n is the surface normal. But you accidentally left out the 2.
Problem 4: Compositing (12 pts)
Prove that compositing with premultiplied alpha is an associative operation. That is, for any three images A, B, and C, prove that
(A over B) over C = A over (B over C).
Problem 5: Transformations (21 pts)
Classify each of the following 2D homogeneous matrices as follows: (a) rotation, (b) mirror reflection, (c) uniform scale, (d) nonuniform scale, (e) translation, (f) shear, or (g) combi- nation.
Earlier categories take precedence over later categories if more than one applies. There is not a one-to-one mapping between the matrices and the categories.