the only object in the scene is the generic sphere
the only attribute of the generic sphere is an assigned (emissive)
color
the camera is set up on the positive z axis, looking
toward the origin
speed-up has been accomplished by more wisely computing
the ray's direction, for each ray.
Specifics:
Set up a directory for Version 1.1 of your ray tracer, which will contain
driver program (rt_v1.1.cpp)
current version of ray tracing tools (header and implementation files)
makefile
Change your method raytracer( ) so that it
only calculates a component (x,y, or z) of the ray's
direction when that component has changed,
uses constants that need to be calculated only once for all the rays,
makes use of the fact that the x component of the ray's direction
can be calculated by adding a constant to the x component of
the ray going through the pixel in the column just to its left,
makes use of the fact that the y component of the ray's direction
can be calculated by adding a constant to the y component of
the ray going through the pixel in the row just below it.
Driver Program:
Compare the runtime of this version to version 1.0.
Set up a Working directory and make a subdirectory v1.1under
it. When you have version 1.1 working correctly, copy all files
pertaining to it, including the makefile, to that directory
and don't touch it!