Image Specifications:
Left Image
Camera at (1, -18, 3.5), looking at (-1, 1, 2), with up defined as (0, 0, 1)
White point light at (20, 30, 100)
Red point light at (-40, -30, 50)
Soft white global ambient light
Red sphere at (-2, -0.5, 2), with radius 1.2
Cyan sphere at (1.5, 1, 4), with radius 2
Invisible magenta spheres at (25, 25, 120) and (-5, -5, -20) with radii 10 and 10
Gray plane running through (0, 0, -0.1) with normal vector (0, 0, 1)
Right Image
Same as above but with camera at (1, -18, -3.5)
Performance evaluation here
Creative Images:
Design choices:
I tried as much as possible to keep the structure of the ray tracer modular, allowing for addition
of features later, as well as keeping the design simple for the sake of future class projects.
As for class interfaces, I tried to create abstract base classes with simple interfaces that capture
the total essence of that family of classes. A simple example is my Background class, which
contains a single pure virtual method, named color(int j, int i). A background object needs
to be able to tell what color the background is at each pixel in the final image. Therefore, it has
the one method. Whatever state is necessary to make that determination is kept in concrete subclasses
of Background. This is a simple example, and a common practice in C++ programming, but
nonetheless I have tried to apply the practice to all aspects of my ray tracer.
Extra Credit 3:
![]() |
![]() |
These images show the same scene, through different cameras. Each one has:
In the left image, a PinholeCamera is used. Note that the spheres
are visibly at different distances from the camera. In the right image, an
OrthographicCamera is used, destroying the perception of distance.