This project is a simple raytracer written in C. It is a part of the 42 school curriculum. The goal of this project is to learn about raytracing and to create a simple raytracer.
To get a local copy up and running follow these simple steps.
- Clone the repo, with submodules (libft)
git clone --recurse-submodules
- The submodules are needed to compile the project, if you forgot to clone with submodules, you can use the following command:
Also miniLibX is needed to compile the project, there is a builded version of the library in the repository, but if you want to build it yourself, you can use the following command:
git submodule update --init --recursive
make -C minilibx
- Compile the project
make
Note: If you want to compile the project with the bonus, you can use the following command:
make bonus
- Run the program
./miniRT [scene_file]
- Multithreading (using pthread)
- Normal mapping
- Camera switching
- Save the rendered image in a .bmp file
- Multiple light sources
- Multiple objects, with different materials
- Object own space (sphere, cylinder, plane), with transformations matrix