Ray tracing renders by following the paths of light rays as they interact with scene objects and lights
Ray tracing is conceptually simple: it follows the path of a ray of light through a scene as it interacts with and bounces off objects. A ray is typically cast from the virtual camera through each pixel; intersection tests find the first surface it hits. At each intersection the renderer evaluates lighting by spawning shadow rays to light sources (testing visibility) and recursive rays for reflections and refractions, so the recursive structure produces reflections, refractions, and global illumination without special cases. Formally this implements the rendering equation: outgoing radiance = emitted radiance + the integral of incoming radiance weighted by the surface’s BSDF and a cosine term. That integral has no analytic solution for complex scenes, so Monte Carlo sampling approximates it by tracing many rays per pixel and averaging. Every ray tracer must handle the same fixed set of components: camera/film (which rays to generate), ray–object intersection, light distribution, visibility, surface scattering (BRDFs/BSDFs), indirect light transport (recursive reflected/refracted rays), and propagation through participating media.
Examples
A mirror surface spawns a reflected ray; a diffuse surface samples multiple directions for indirect illumination and casts shadow rays; a glass sphere spawns both a reflected and a refracted ray, the transmitted ray may hit a diffuse floor and spawn its own shadow rays, and the summed bounces give the final pixel colour.
Assessment
Trace by hand the rays that must be cast when a camera ray hits (a) a perfect mirror, (b) a diffuse surface, and (c) a glass sphere. For each, list the spawned rays, identify which renderer component handles each, and state what information each ray contributes to the pixel value.