This 42's curriculum project implements a basic ray tracer in C. Completely from scratch, the only library (functions) allowed where:
- minilibX, a very basic window manager
- open, close, read, write, printf, malloc, free, exit
- sin(), cos(), sqrt() and all other math library functions
It can run as an application or export to a bmp file called scene.bmp
It renders on the CPU, featuring antialiasing and multithreaded rendering
It supports the primitives:
- spheres
- planes
- cylinders
- squares
- triangles
Supports both macOS and Linux
make bonus
./miniRT ./rt/room.rt
./miniRT --save ./rt/room.rt
This ray tracer can be used as a fun benchmarker.
- Change number of cores in
settings.h - Run
make bonus - Run
time ./miniRT rt/dragon.rt --save
MM:SS | <name> | <date>
01:01 | MacBook Pro 13-inch 2020, M1, Kernel Version 21.6.0 | 2022-11-22
00:34 | MacBook Pro 16-inch 2021, M1 Pro, Kernel Version 21.6.0 | 2022-11-22


