Skip to content

A fun challenge for building a simple ray tracer

Notifications You must be signed in to change notification settings

amirzia/ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer Challenge

This is a fun challange for building a simple ray tracer. We're going to build that step by step with instructions given by @aslrousta. I thank him for initiating this challenge. I add more steps as we go forward.

This project is written in C++ and OpenGL and is tested on macOS 10.15 (I haven't tested it on other OSs). I invented the wheel and wrote Vector and Matrix classes to refresh my C++ knowledge. To compile and run, just issue.

g++ -g -framework OpenGL -framework GLUT -o out main.cpp math.cpp
./out

Step 1 Projection

In the first step, we project a 3d object onto a 2d screen. The vertices, faces, and cameras are in the file model.txt. You can read the instructions of this step for more details.

down

up

Todo

  • Get the camera index as the arguement.
  • Add makefile.

About

A fun challenge for building a simple ray tracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages