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.
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