Skip to content

joanBondri/miniRT

Repository files navigation

MiniRT - Raytracing Graphics Engine

GitHub last commit

Overview

MiniRT is a project created as part of the "MiniRT" curriculum at École 42, designed to provide an introduction to the world of computer graphics and raytracing. The goal of this program is to generate computer-generated images that represent scenes from specific angles and positions, defined by simple geometric objects, and lit by customizable lighting systems. MiniRT is developed using the miniLibX library and offers a range of features for rendering scenes.

Features

  • Raytracing protocol-based rendering.
  • Simple geometric objects: plane, sphere, and cylinder.
  • Fluid window management: window switching, minimization, etc.
  • Resolution change without altering the scene's content.
  • Support for transformations: translation and rotation of objects, lights, and cameras.
  • Lighting features: ambient and diffuse lighting, spot brightness, hard shadows.
  • Scene description via a text file with the .rt extension.
  • Error handling for misconfigurations in scene description files.
  • Support for Ambient, Sphere, Cylinder, Plane, Camera, and Light elements in scene files.

Getting Started

Prerequisites

Before you begin, ensure you have the following requirements:

  • A Unix-based operating system (Linux).
  • miniLibX library installed on your system.

Installation

  1. Clone this repository to your local machine.
git clone https://github.com/joanBondri/MiniRT.git
cd MiniRT
  1. Build the project using the provided Makefile.
make

Usage

To run MiniRT, execute the following command:

./MiniRT path_to_scene.rt

Replace path_to_scene.rt with the path to your scene description file.

Scene Description

The scene is defined in a text file with the .rt extension. You can create scenes by specifying elements in a specific order:

  • Ambient lighting (A)
  • Camera (C)
  • Light (L)
  • Sphere (sp)
  • Plane (pl)
  • Cylinder (cy)

Example scene description:

A 0.2 255,255,255
C -50.0,0,20 0,0,1 70
L -40.0,50.0,0.0 0.6 10,0,255
pl 0.0,0.0,0.0 0.0,1.0,0.0 0,0,225
sp 0.0,0.0,20.6 12.6 255,0,0
cy 50.0,0.0,20.6 0.0,0.0,1.0 14.2 21.42 10,0,255

Testing

The project may include test scenes to showcase its functionality. You can create your own scenes by following the scene description format.

Images

image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published