Back
2023
# Graphics Programming

Raytracer

A modular C++ raytracer with real-time navigation and a plugin-based system for custom primitives.

~/Tags

C++Real-Time Rendering2023

~/About

This project is a fully modular raytracer written in C++. It supports both real-time navigation inside the scene using WASD and mouse controls and offline rendering with PPM or PNG export. The engine is built around an object-oriented architecture using interfaces, templates, and several design patterns, including Builder/Director for scene construction, Factory for object creation, and Strategy for interchangeable rendering behaviours. The system loads primitives and lights from an external scene configuration file and also supports a dynamic plugin system that allows new primitives. Implemented primitives include planes, spheres, cylinders, and cones, each handled through a generic interface-based structure.

~/Gallery

view
view

~/Key features

Real-time navigation with WASD + mouse look
PPM and PNG image export
Scene loading via external configuration (libconfig++)
Primitives: Sphere, Plane, Cone, Cylinder
Camera system with FOV, position, orientation
Transformations: translation and rotation
Ambient and directional light support
Strict interface-based architecture (IPrimitive, ILight)
Design patterns: Builder + Director, Factory, Strategy
Dynamic plugin system allowing new primitives