For this assignment, you will be building a Ray Tracer using C/C++, Python, or Java. The choice of which of these languages is up to you, but keep in mind that language- specific support is not provided (you should use the language you can locally support and are comfortable coding in). The system only needs to handle the rendering of ellipsoids, with a fixed camera situated at the origin in a right-handed coordinate system, looking down the negative z-axis. Local illumination, reflections, and shadows will also need to be implemented.
The program should take a single argument, which is the name of the file to be parsed. Make sure your executable has the name “raytracer.exe” (or equivalent for the language you choose) and that we can run it as in the following example:
> RayTracer.exe testCase1.txt
> java RayTracer testCase1.txt
> python RayTracer.py testCase1.txt
We will use a script to generate the outputs for the set of posted test cases. You will get zero marks if we cannot compile your program and if we cannot run this script because your project does not implement the required specifications above.
Input File Format
The content and syntax of the file is as follows:
- The near plane**, left**, right**, top**, and bottom**
- The resolution of the image nColumns* X nRows*
- The position** and scaling** (non-uniform), color***, Ka***, Kd***, Ks***,
Kr*** and the specular exponent n* of a sphere
- The position** and intensity*** of a point light source
- The background colour ***
- The scene’s ambient intensity***
- The output file name (you should limit this to 20 characters with no spaces)
* int ** float *** float between 0 and 1
T OP <t>
RES <x> <y>
SPHERE <name> <pos x> <pos y> <pos z> <scl x> <scl y> <scl z> <r> <g> <b> <Ka> <Kd>
<Ks> <Kr> <n>
… // up to 14 additional sphere specifications
LIGHT <name> <pos x> <pos y> <pos z> <Ir> <Ig> <Ib>
… // up to 9 additional light specifications BACK <r> <g > <b>
AMBIENT <Ir> <Ig> <Ib>
All names should be limited to 20 characters, with no spaces. All fields are separated by spaces. There will be no angle brackets in the input file. The ones above are used to indicate the fields.
26 Total Marks
 Coding Style (i.e. well designed, clean, & commented code)
 x 12 For each of the given test cases.
[-4 Marks if not] Provide a readme.txt that describes what you have done, what you have omitted, and any other information that will help the grader evaluate your work, including what is stated below.
There will be no partial marks given if your program fails to parse the input file or if it does not produce the correct output.
Make sure you submit all the required files so we can compile and build your program. If there are missing libraries, you will get zero marks.
We will use a script to generate the outputs for a set of test cases. You will get zero marks if we cannot run this script because your program does not adhere to the given requirements. (Repeated for emphasis)