Home >> Programs >> Raytracer

This project was made for school. I had to implement some basic raytracing components. I decided to go a little further with the project and I have implemented more components to this raytracer.

General information

Written in:


Raytracing is a method to render a 3D environment to an 2D screen. The 3D environment is given in as a mathematical description along with some other parameters like color and reflection. The screen is build up using rays that come out of the viewers eyes(camera) through an imageplane into the 3D world. The ray is tested for intersections with the objects in the 3D world. If there is no intersection it returns the backgroundcolor for that pixel. If a collision has occured it checks which object has been hit the first. The color that will be returned for this pixel has been calculated using alot of attributes of the object and reflections. This way the whole screen is filled pixel by pixel.

This raytracer consists of the following features:
  • Ray-Sphere intersections
  • Ray-Triangle intersections
  • Ray-Plane intersections
  • Ray-Cylinder intersections
  • Ray-Custom Object intersections (obj files)
  • Diffuse lighting
  • Phong highlights
  • Hard shadows
  • Soft shadows
  • Reflections
  • Supersampling (Anti-Aliasing)
  • Texturing



Changelog v1.1 Download offline
Application files Download offline
Source files Download offline