This project is an implementation of a simple ray tracer using the miniLibX library. It's capable of rendering basic 3D scenes described in .rt files.
For more detailed information about the project requirements and specifications, please refer to the subject.pdf.
This project uses a Makefile for compilation. Here are the main commands:
make: Compile the mandatory partmake bonus: Compile the bonus partmake clean: Remove object filesmake fclean: Remove object files and executablesmake re: Recompile the project
The compilation process will create an executable named miniRT for the mandatory part or miniRT_bonus for the bonus part.
To create the executable, follow these steps:
-
Open a terminal and navigate to the project's root directory.
-
For the mandatory part, run:
makeThis will create the
miniRTexecutable. -
For the bonus part, run:
make bonusThis will create the
miniRT_bonusexecutable. -
If you want to recompile everything from scratch, you can use:
make reor
make fclean && make
After successful compilation, you should see the miniRT or miniRT_bonus executable in your project directory.
To run the program:
./miniRT <scene_file.rt>
For the mandatory part, use the files in data/ that start with "mandatory_".
For the bonus part, use the files that start with "bonus_".
Example:
./miniRT data/mandatory_model.rt
- C programming language
- miniLibX library for graphical rendering
- Math library for mathematical calculations
- Ray tracing algorithms for 3D rendering
This project follows the Norm, a programming standard used at 42 school. For more information about the Norm and the Norminette tool used to check it, please refer to the 42 Norm repository.
- Render basic 3D shapes: spheres, planes, and cylinders
- Handle ambient and diffuse lighting
- Parse .rt scene description files
- Apply translations and rotations to objects
- Handle window management and basic user input
Bonus features (if implemented):
- Specular reflection (Phong reflection model)
- Checkerboard pattern
- Multiple colored lights
- Additional shapes (cone, hyperboloid, paraboloid)
- Bump mapping
Make sure you have the necessary libraries installed, including miniLibX and the math library, before compiling the project.