everything.study
COMP 4509

Computer Graphics

0.5 credit · Undergraduate

An overview of computer graphics, with an emphasis on rendering. Topics include the following: visibility; ray tracing; graphics hardware; object and scene modeling; lighting, shading, and texture; animation.

Study notes

Independent, AI-drafted study guide · Public sources linked below · Added November 5, 2026

2026–27 calendar alignment for the newly numbered Computer Graphics course, replacing COMP 3009; independent rendering foundations. PBRT is a supplementary reference rather than a course-required text.

Separate scene description from image formation

A scene contains geometry, materials, lights and a camera. Rendering turns that description into pixel measurements. Keep coordinate systems explicit: object coordinates describe a shape locally, world coordinates place it in the scene and camera coordinates express it relative to a viewpoint. A point and a direction transform differently under translation. Clear naming of transforms prevents errors such as treating a camera-to-world matrix as its inverse.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Rasterization and visibility

Rasterization projects primitives onto the image plane and determines which samples they cover. A depth buffer retains the closest depth at each sample, resolving visibility among opaque surfaces. It does not automatically solve transparency, where several layers may contribute in an order-dependent way. Clip geometry appropriately before perspective division, and interpolate attributes with perspective correction where required. A visually plausible image can still hide incorrect geometry or projection conventions.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Ray tracing as geometric intersection

A ray is r(t) = o + td, with origin o and direction d. Intersecting it with a sphere substitutes this expression into the sphere equation, producing a quadratic. The closest valid positive root identifies the visible hit, assuming the ray's parameter range excludes self-intersection. Shadow rays test whether a light is occluded. Recursively tracing reflection and transmission rays captures additional transport effects but requires termination criteria and careful numerical handling.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Normals, lighting and material response

Geometry determines where a surface lies; a normal describes its local orientation. Lambertian diffuse lighting depends on the nonnegative dot product between normalized surface normal and light direction. Specular reflection depends on viewing direction and material properties. Under nonuniform scaling, normals require an inverse-transpose transform rather than the ordinary point transform. Distinguish radiometric quantities and colour encodings: adding values in a nonlinear display encoding can give physically incorrect lighting.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Texture filtering and image sampling

A texture maps surface coordinates to attributes such as colour or roughness. Sampling a detailed texture too sparsely creates aliasing, causing flickering or false patterns. Filtering and mipmaps reduce these errors by approximating an appropriate footprint rather than always reading one texel. The same sampling issue affects geometry edges and animation. Supersampling reduces some aliasing but costs computation; assess the actual signal being sampled rather than assuming more resolution fixes every artifact.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Acceleration structures and performance

Testing every ray against every primitive is expensive. A bounding-volume hierarchy groups geometry into nested bounding boxes so a ray can skip entire subtrees when it misses their bounds. Traversal trades additional box tests for fewer primitive intersections. Construction quality, scene motion and memory layout all matter. Avoid judging performance solely by polygon count: material complexity, ray coherence, overdraw and memory access can dominate different rendering workloads.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Worked ray intersection and animation continuity

For a unit sphere at the origin, take a ray from (0,0,3) in direction (0,0,-1). Its z coordinate is 3 - t; the sphere equation gives (3 - t)^2 = 1, so hits occur at t = 2 and t = 4. The first visible hit is t = 2. In animation, interpolate positions and orientations with methods appropriate to their representation; independently interpolating rotation-matrix entries generally fails to preserve a valid rotation.

References: Carleton 4509 official calendar record · Pharr, Jakob and Humphreys: Physically Based Rendering, fourth edition

Practice & worked answers

Original exercises for this guide.

1. Why normalize vectors before using a dot product as an angle cosine?

Show worked answer

The identity a dot b = |a||b|cos(theta) includes vector lengths. Unit lengths remove their scale factors, leaving only the directional cosine.

2. Does a bounding box hit prove that a ray intersects the contained object?

Show worked answer

No. The box is a conservative filter. A miss can reject the object, but a hit still requires testing the actual geometry.

Public notes & references

Course sources establish the scope above. Reference materials support the explanations; linked lecture notes and books remain with their authors.

Topics

Course catalogue

Prerequisites & course information

Precludes additional credit for COMP 3009 (no longer offered). Prerequisite(s): COMP 2401 with a minimum grade of C- , COMP 2402 , ( MATH 1004 or MATH 1007 ), and ( MATH 1104 or MATH 1107 ). Lecture three hours a week.

Sources