How liamtannerr/raytracer works
This is a C++ sphere ray tracer. The implemented workflow is a hardcoded scene built in main, rendered by the camera through recursive ray hits and material scattering, then emitted as PPM text. The README also documents JSON scene input, PPM conversion, and animation tooling, but the supplied tree/source does not expose their implementation; those are shown only as documented capabilities, not wired into the runtime flow.
Main entry points: camera.h Camera Renderer · scene_element_list.h Scene Collection · main.cc Scene Setup · sphere.h Sphere Geometry
Components 14
Scene Model
- Scene Setup
src/main.cc - Scene Collection
inc/scene_element_list.h - Sphere Geometry
inc/sphere.h - Surface Materials
inc/material.h - JSON Scene Input
Render Engine
- Camera Renderer
inc/camera.h
Ray Primitives
- Hit Interface
inc/scene_element.h - Ray
inc/ray.h - Vector Math
inc/vec3.h
Image Output
- Colour Encoding
inc/colour.h - PPM Stream
- ImageMagick
- ffmpeg
Other components
- Operator
Connections 15
- Operator → Scene Setup: launches
- Scene Setup → Scene Collection: populates
- Scene Setup → Camera Renderer: calls render
- Scene Collection → Sphere Geometry: tests hits
- Sphere Geometry → Hit Interface: implements hit
- Camera Renderer → Scene Collection: queries hits
- Camera Renderer → Ray: creates rays
- Camera Renderer → Surface Materials: calls scatter
- Camera Renderer → Colour Encoding: encodes pixels
- Camera Renderer → PPM Stream: writes PPM
- Sphere Geometry → Surface Materials: records material
- Ray → Vector Math: uses math
- JSON Scene Input → Scene Collection: defines scene
- PPM Stream → ImageMagick: converts image
- PPM Stream → ffmpeg: supplies frames