gitubanana / miniRT

A simple raytracing renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

miniRT

Screen Shot 2023-02-27 at 6 50 33 PM

We made a ray tracing renderer in C.

How we coded?

Ray

Everything is rendered by vector operation. Ray starts from the camera then traces the closest object and reflects from it. When a ray hits a surface, it leads to creating two new rays(diffuse reflection, and specular reflection). In default, reflection is limited to 3 times(2^3 vector calculations per pixel)

Objects

  1. Plane
  2. Sphere
  3. Cylinder

How to run? (Works on macOS)

Enter the command 'make' in the cloned folder. Then executable named 'miniRT' will appear. Run it with the provided .rt file! './miniRT /rt/pyramid.rt'

Keys

: Forward

: Backward

: Left

: Right

PageUp : Ascend

PageDown : Descend

Screenshots

mirror Mirror rainbow Rainbow snowman Snowman
complex Complex pyramid Pyramid shadow Shadow

Reference

Ray Tracing in One Weekend

https://raytracing.github.io

About

A simple raytracing renderer


Languages

Language:C 80.3%Language:Objective-C 18.0%Language:Makefile 1.7%