MiniRT is a project created as part of the "MiniRT" curriculum at École 42, designed to provide an introduction to the world of computer graphics and raytracing. The goal of this program is to generate computer-generated images that represent scenes from specific angles and positions, defined by simple geometric objects, and lit by customizable lighting systems. MiniRT is developed using the miniLibX library and offers a range of features for rendering scenes.
- Raytracing protocol-based rendering.
- Simple geometric objects: plane, sphere, and cylinder.
- Fluid window management: window switching, minimization, etc.
- Resolution change without altering the scene's content.
- Support for transformations: translation and rotation of objects, lights, and cameras.
- Lighting features: ambient and diffuse lighting, spot brightness, hard shadows.
- Scene description via a text file with the .rt extension.
- Error handling for misconfigurations in scene description files.
- Support for Ambient, Sphere, Cylinder, Plane, Camera, and Light elements in scene files.
Before you begin, ensure you have the following requirements:
- A Unix-based operating system (Linux).
- miniLibX library installed on your system.
- Clone this repository to your local machine.
git clone https://github.com/joanBondri/MiniRT.git
cd MiniRT
- Build the project using the provided Makefile.
make
To run MiniRT, execute the following command:
./MiniRT path_to_scene.rt
Replace path_to_scene.rt
with the path to your scene description file.
The scene is defined in a text file with the .rt extension. You can create scenes by specifying elements in a specific order:
- Ambient lighting (A)
- Camera (C)
- Light (L)
- Sphere (sp)
- Plane (pl)
- Cylinder (cy)
Example scene description:
A 0.2 255,255,255
C -50.0,0,20 0,0,1 70
L -40.0,50.0,0.0 0.6 10,0,255
pl 0.0,0.0,0.0 0.0,1.0,0.0 0,0,225
sp 0.0,0.0,20.6 12.6 255,0,0
cy 50.0,0.0,20.6 0.0,0.0,1.0 14.2 21.42 10,0,255
The project may include test scenes to showcase its functionality. You can create your own scenes by following the scene description format.