miniRT is a ray tracing program written in C using the MiniLibX library. It renders basic 3D scenes by simulating how light interacts with geometric objects. Created for 42Paris, this project builds on your knowledge of C programming, mathematical transformations, and real-time rendering techniques.
- Parse and render scene descriptions from “.rt” files
- Supports basic geometric shapes: Plane, Sphere, Cylinder
- Ambient and diffuse lighting, plus hard shadows
- Rotations and translations of shapes, lights, and cameras
- Window event handling (close by pressing ESC or clicking the red cross)
- Language: C
- Libraries: MiniLibX, libft, math library (compile with -lm)
- Raytracing: Compute intersections, apply transformations, manage shadows, etc.
- GCC or any C compiler
- GNU Make
- MiniLibX (included in the repo under
Libs/)
- Clone the repository:
git clone https://github.com/Agrippa2023/miniRT.git cd miniRT - Build the project:
make
Run the program by specifying a valid “.rt” scene file:
./miniRT path/to/scene.rtSome sample scene files are located in the Scene_files/ directory. Each file describes a 3D scene with objects, lights, and camera settings. Simply pass a valid “.rt” file to miniRT at launch.
./miniRT Scene_files/img17.rtSrcs/: Source code (grouped by modules likeCamera,Shapes,Ray,parser, etc.)Includes/: Header filesLibs/: External libraries (libft,minilibx-linux)Scene_files: Sample scene files (*.rt)images/: Examples of 3D scenes generated with miniRTtextures/: Additional texture assetsMakefile/: Build script
Developed at 42Paris. Special thanks to the 42 community for its resources and everyone who contributed helpful references.
Distributed under the MIT License. See LICENSE for more information.











