Skip to content

josiaskas/miniRT

Repository files navigation

MiniRT

A simple raytracer written in C

Normal · Bonus

MiniRT

Table of Contents

About The Project

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.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. 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:
        git submodule update --init --recursive
    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:
        make -C minilibx
  1. Compile the project
    make

Note: If you want to compile the project with the bonus, you can use the following command:

    make bonus

Usage

  1. Run the program
    ./miniRT [scene_file]

Bonus

  • 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

Images

MiniRT MiniRT MiniRT

About

Raytracing Project for 42

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published