Skip to content

paoptu023/COMS4160

Repository files navigation

Ray Tracer

A ray tracer starting from scratch in C++.

Features:

  • points, vectors, spheres, triangles, planes
  • point, ambient, and area light sources
  • blinn-phong shading model
  • diffuse and reflective materials
  • triangle meshes (obj file format)
  • axis-aligned bounding boxes and bvh trees for acceleration
  • jittered monte-carlo antialiasing (smooth edges and soft shadows)
  • hdr format (.exr)

To compile:

  • mac: g++ -O2 *.cc -I. -I/usr/local/include/OpenEXR -lIlmImf -lImath -lHalf -Wall -o raytra
  • linux: g++ -O2 *.cc -I. -I/usr/include/OpenEXR -lIlmImf -lImath -lHalf -Wall -o raytra

To run:

  • ./raytra [scenefile.txt] [output.exr] [PRIMARY_NUM] [SHADOW_NUM]

About

For COMS4160 Computer Graphics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors