A raytracer written in C from scratch with MiniLibX. Built at 42 Berlin as part of the Common Core .
Give it a scene file describing a camera, lights and objects — it renders the 3D scene, with lighting and shadows, one ray at a time.
- Parses and validates
.rtscene files: ambient light, camera (position, orientation, FOV), light sources, and objects — spheres, planes, cylinders - Casts a ray per pixel and solves the ray–object intersection equations analytically
- Lighting: ambient + diffuse (Lambertian) shading and hard shadows via secondary rays toward each light
- Correct handling of camera orientation and object transformations (position, rotation, scale where applicable)
- Clean window management and exit, no leaks
3D vector math implemented by hand (dot/cross products, normalization, quadratic intersection solving), a rendering pipeline from scene description to pixels, and performance-conscious C — no graphics engine, no math library beyond libm.
make
./miniRT scenes/[scene].rt