My source code for project 1 can be found here.
None.
Below are some of the design decisions I made for this project:
Points/Vectors:
I decided to represent points and vectors as separate classes. I thought this
would be the easiest way because it allows for less confusing code. It is much
easier to distinguish the points from the vectors, in both writing and reading
the code. I also decided to separate them because geometrically points and
vectors are very different, so a lot of the operators didn't make sense for
both. This allowed me to only overload appropriate operators for each class.
In addition, I made the data members public floats instead of an array because
it is easier to deal with x, y, z instead of the indices of an array.
Image Format:
I chose to use PPM as my image format because the specifications of the format
were readily available. I also decided to use the binary data version of the
PPM format, which uses P6 to identify the file type. It was fairly easy to
implement, and the storage of the image structure is very simple, so it isn't
very costly.
I decided it would be beneficial to implement the extra credit for debugging future assignments. So I implemented an integrated image viewer for my ray tracer using OpenGL. My image viewer allows for the rendering of the entire frame, every row of the image, or every pixel of the image. My GUI is very simple and contains a radio button list of the three options and a start button. You just choose the type of rendering you want, click the start button, and watch it render. Perhaps in future assignments more functionality will be added as necessary, but for now it doesn't need to be very complicated.
Below are a couple images of my image viewer and GUI. The top is rendered as a frame, and the bottom is part way through rendering row by row.