Skip to content

jtcat/minirt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b435b5c · Oct 12, 2024

History

98 Commits
Apr 19, 2024
May 8, 2024
May 8, 2024
May 8, 2024
May 8, 2024
May 8, 2024
Oct 12, 2024
Oct 12, 2024

Repository files navigation

MiniRT - A 42 School Ray Tracer

This is a simple software ray tracer written in C.

Authorship

João Catarino: @jtcat

Pedro Mota: @peterbikes

Example

demo

Features

  • Scene description via file
  • Phong shading
  • Hard shadows
  • Three primitive types: planes, spheres and cylinders
  • Ambient lighting
  • Support for multiple colored point-lights
  • Transform based object translation and rotation
  • Real-time scene editing

Building

This project requires the 42 School minilibx library to be present at the root of the project. It can be downloaded by running make minilibx Then simply run make bonus

Usage

MiniRT requires a scene description file with an .rt extension.

This snippet represents a simple configuration with all possible primitive types:

A 0.2    255,255,255
C 130,0,0    0,0,-1    70
L 130,0,-50    0.7    255,255,255
pl 0,-60,0    0,1.0,0    255,0,225
sp 130,25,-100    20    255,0,0
cy 130,0.0,-100.6    0,1.0,0    14.2 30.42    10,0,255

Then simply run ./miniRT scene.rt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published