3  ICG Mock Exam 2021 — Concise Solutions

3.1 Task 1 — Fundamentals

a) Raster graphics vs. vector graphics

Not yet completed.

b) Concepts

i) Up vector

The up vector specifies which direction appears upward in the camera image. Together with the view direction, it fixes the camera coordinate system and removes ambiguity about camera roll. It must not be parallel to the view direction.

ii) Double buffering

The front buffer displays the current image while the next frame is rendered into the invisible back buffer. After rendering, the buffers are swapped. This prevents incomplete frames and decouples rendering from screen refresh.

iii) View frustum

The view frustum is the region visible to the camera, bounded by left, right, top, bottom, near, and far planes. It is a truncated pyramid for perspective projection and a cuboid for orthographic projection. Geometry outside it is clipped; projection maps it to the normalized unit cube.

iv) Backface culling

Triangles facing away from the camera are discarded, usually based on vertex winding. For closed meshes these backfaces are hidden anyway, so culling saves rasterization work. It is unsuitable for visible interiors or two-sided surfaces.

c) Vertex normals and degenerate triangles

For each triangle, compute its face normal:

\[ \mathbf n_f=(\mathbf p_2-\mathbf p_1)\times(\mathbf p_3-\mathbf p_1). \]

At each vertex, sum adjacent face normals—optionally area- or angle-weighted—and normalize. A zero-length edge yields a zero cross product, which cannot be normalized; degenerate triangles must therefore be ignored or removed.

d) Sharp edges with Gouraud and Phong shading

Multiple normals preserve a normal discontinuity across a sharp edge in both methods. Gouraud shading computes and interpolates vertex colors, so it may miss lighting effects between vertices. Phong shading interpolates the separate normals and evaluates illumination per fragment, giving more accurate results at higher cost.

e) Projection types

  • Orthographic projection: parallel projection rays; size does not decrease with distance and parallel lines remain parallel.
  • Perspective projection: rays meet at the projection centre; distant objects appear smaller.

f) Aliasing

Aliasing occurs when a signal is sampled below the Nyquist rate. High frequencies are then represented as false lower frequencies. Artifacts include jaggies, Moiré patterns, distorted detail, and temporal flickering.

g) Perspective division and dehomogenization

After projection, a point has homogeneous clip coordinates

\[ (x_h,y_h,z_h,w_h). \]

Perspective division gives

\[ (x_h,y_h,z_h,w_h) \longmapsto \left(\frac{x_h}{w_h},\frac{y_h}{w_h},\frac{z_h}{w_h}\right). \]

Because \(w_h\) depends on depth in perspective projection, this produces foreshortening and maps the frustum to normalized device coordinates. It is precisely dehomogenization after projection, also called the normalization transformation.

h) Rendering equation

\[ L(\mathbf x,\omega)=E(\mathbf x,\omega) +\int_{\Omega^+} f(\mathbf x,\omega_i\rightarrow\omega) L_{\mathrm{in}}(\mathbf x,\omega_i) \cos\theta_i\,d\omega_i. \]

i) Components

  • A — \(L(\mathbf x,\omega)\): outgoing radiance from \(\mathbf x\) in direction \(\omega\).
  • B — \(E(\mathbf x,\omega)\): emitted radiance.
  • C — \(f(\mathbf x,\omega_i\rightarrow\omega)\): fraction of incoming light reflected toward \(\omega\).
  • D — \(L_{\mathrm{in}}(\mathbf x,\omega_i)\): incoming radiance from \(\omega_i\).

The integral sums all incoming directions in the positive hemisphere; \(\cos\theta_i\) accounts for projected surface area.

ii) Name and dimensionality of \(f\)

\(f\) is the bidirectional reflectance distribution function (BRDF). At a fixed point it is four-dimensional:

\[ f(\theta_i,\phi_i,\theta_o,\phi_o). \]

iii) Isotropic BRDF

Rotational invariance around the normal removes one angular degree of freedom, leaving three dimensions:

\[ f(\theta_i,\theta_o,\phi_i-\phi_o). \]

iv) Recursion

Incoming radiance at \(\mathbf x\) is outgoing radiance from the next visible surface point. Evaluating it requires the same equation there, producing recursive secondary rays.

3.2 Task 2 — Color

a) Role of K in CMYK

\(K\) is key/black ink. It replaces the common black component

\[ K=\min(C,M,Y), \]

because CMY inks do not produce a clean covering black. Separate black improves contrast and saves colored ink.

b) Missing dimension in the chromaticity diagram

The diagram omits luminance \(Y\) and displays only chromaticity \((x,y)\). Lowercase \(z\) is not an independent missing dimension because \(z=1-x-y\).

NoteRecall: CIE XYZ and xyY

\(X,Y,Z\) are tristimulus values obtained from the spectrum \(S(\lambda)\):

\[ X=\int S(\lambda)\,\overline{x}(\lambda)\,d\lambda, \qquad Y=\int S(\lambda)\,\overline{y}(\lambda)\,d\lambda, \qquad Z=\int S(\lambda)\,\overline{z}(\lambda)\,d\lambda. \]

\(Y\) represents luminance. Chromaticity is

\[ x=\frac{X}{X+Y+Z},\qquad y=\frac{Y}{X+Y+Z},\qquad z=\frac{Z}{X+Y+Z}=1-x-y. \]

c) Luminance sensitivity and compression

Vision is more sensitive to luminance than to chrominance variation. Compression therefore preserves luminance at higher resolution while subsampling or more strongly quantizing chrominance channels, e.g. \(C_b\) and \(C_r\) in YCbCr.

d) MacAdam ellipses

A MacAdam ellipse contains colors indistinguishable from its centre at a chosen threshold. Their varying sizes and orientations in CIE \(xy\) show perceptual non-uniformity. In a perfectly uniform color space they would be equal-sized circles.

e) Metamerism

Metamerism: different spectra produce the same cone responses and are therefore perceived as the same color.

f) Mach bands

Mach bands are illusory bright and dark bands near changes in a luminance gradient. Centre-surround receptive fields and lateral inhibition exaggerate local contrast: the bright side appears brighter and the dark side darker.

NoteRecall: centre-surround function

An ON-centre/OFF-surround field behaves approximately as

\[ R\approx I_{\mathrm{centre}} -\operatorname{average}(I_{\mathrm{surround}}). \]

Uniform illumination largely cancels, while local differences produce a strong response. This enhances edges and reduces redundant brightness information.

g) CIE chromaticity diagram

i) Gamut of \(n\) primaries

The gamut is the convex hull of the primaries: a convex polygon with at most \(n\) vertices; three primaries usually form a triangle.

ii) Spectral colors

Monochromatic colors lie on the curved spectral locus. The straight segment \(EF\) is excluded.

iii) Line of purples

The straight segment \(EF\) contains additive mixtures of the red and violet endpoints. These purples are not monochromatic; mixtures of two colors lie on the line connecting them.

iv) Point C and complementary colors

\(C\approx(1/3,1/3)\) is achromatic white. Since \(A,C,D\) are collinear and \(C\) lies between \(A\) and \(D\), suitable proportions of \(A\) and \(D\) produce white:

\[ C=(1-t)A+tD. \]

Thus \(A\) and \(D\) are complementary relative to white point \(C\).

v) Relation between A, B, and D

\(B\) lies on segment \(AD\), so it is an additive mixture of \(A\) and \(D\). Because it lies between \(A\) and white point \(C\), it is a less saturated version of \(A\).

3.3 Task 3 — Ray Tracing

a.i) Ray generation

For every pixel sample, generate a primary ray from camera position \(\mathbf e\) through the corresponding image-plane point \(\mathbf s\):

\[ \mathbf r(t)=\mathbf e+t(\mathbf s-\mathbf e),\qquad t\geq0. \]

The nearest intersection determines the visible surface and therefore the pixel color.