MiniRayX is a simple yet powerful ray tracing program built with MiniLibX, designed to generate stunning 3D computer graphics. This project serves as an introduction to the fascinating world of ray tracing, allowing you to create simple yet impressive computer-generated images.
- Implements basic ray tracing techniques
- Supports multiple geometric objects: spheres, planes, and cylinders
- Handles ambient and diffuse lighting
- Applies translations and rotations to objects, lights, and cameras
- Reads scene descriptions from .rt files
- Renders images in a resizable window
- C compiler (gcc recommended)
- MiniLibX library
- Math library
- Clone the repository:
git clone https://github.com/48k483x/miniRayX.git
- Navigate to the project directory:
cd MiniRayX
- Compile the project:
make re
Run the program with a scene file as an argument:
./miniRT scenes/scene.rt
- Sphere (sp)
- Plane (pl)
- Cylinder (cy)
Scene files use the .rt extension and follow this format:
- Ambient lighting:
A 0.2 255,255,255
- Camera:
C -50.0,0,20 0,0,1 70
- Light:
L -40.0,50.0,0.0 0.6 10,0,255
- Sphere:
sp 0.0,0.0,20.6 12.6 10,0,255
- Plane:
pl 0.0,0.0,-10.0 0.0,1.0,0.0 0,0,225
- Cylinder:
cy 50.0,0.0,20.6 0.0,0.0,1.0 14.2 21.42 10,0,255
- ESC: Close the window and exit the program
- Red cross: Close the window and exit the program
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.
- School 42 for the project idea and guidelines
- MiniLibX developers for the graphics library
Happy ray tracing! ๐