This section of the documentation delves into the source code of the PhotoNim raytracer, providing a detailed explanation. First, we will examine the tools developed for creating a functional raytracer, specifically the geometric elements grouped within the geometry.nim module. Following this, we’ll delve into elements unique to raytracing, such as the camera and ray usage, detailed in the camera.nim source file. Additionally, we will cover the random number generator found in the pcg.nim source file, which is crucial in order to solve the rendering equation.


Table of contents