/RayTracingInOneWeekend.c

Yet another (C-language) version of the the popular "Ray Tracing in One Weekend" computer graphics project

Primary LanguageC

Ray Tracing in One Weekend in C

This project is my implementation of the fantastic ray tracing project Ray Tracing on One Weekend by Peter Shirley. The original ray tracer (and it's extensions) are implemented in C++ but I wanted to write a ray tracer in plain C instead. Thus, all physics calculations implementations are very different since OOP and operator overloading are unavailable.

Installation

Clone repository

git clone https://github.com/malmgrek/RayTracingInOneWeekend.c

Build with CMake (from the project directory root), make, and run:

cmake -B build && (cd build && make) && ./build/inOneWeekendC --bar > test.ppm

Optionally show image:

feh test.ppm

Measure execution time:

time ./build/inOneWeekendC > /dev/null