1. Homepage
  2. Programming
  3. Assignment: Ray Tracer

Assignment: Ray Tracer

Engage in a Conversation
C++Ray TracerJavaPythonComputer Graphics

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 (transformed spheres), 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. CourseNana.COM

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 examples: CourseNana.COM

> RayTracer.exe testCase1.txt

or CourseNana.COM

> java RayTracer testCase1.txt

or CourseNana.COM

> 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. CourseNana.COM

Make sure you carefully read the Instructions and Clarifications below as they contain important information on the lighting, scene setup, tracing depth etc. CourseNana.COM

Input File Format CourseNana.COM

The content and syntax of the file is as follows: CourseNana.COM

File Content CourseNana.COM

* integer ** float(s) *** float(s) between 0 and 1 CourseNana.COM

  1. The near plane**, left**, right**, top**, and bottom** CourseNana.COM

  2. The resolution of the image nColumns* X nRows* CourseNana.COM

  3. The position** and scaling** (non-uniform), color***, Ka***, Kd***, Ks***, Kr*** and the specular CourseNana.COM

    exponent n* of a sphere CourseNana.COM

  4. The position** and intensity*** of a point light source CourseNana.COM

  5. The background colour*** CourseNana.COM

  6. The scene’s ambient intensity*** CourseNana.COM

  7. The output file name (you should limit this to 20 characters with no spaces) CourseNana.COM

File Syntax CourseNana.COM

Do not write the angle brackets, these are to show you where to insert values. See the testcase files! NEAR <n>
LEFT <l>
RIGHT <r>
CourseNana.COM

BOTTOM <b> CourseNana.COM

TOP <t> CourseNana.COM

RES <x> <y> CourseNana.COM

SPHERE <name> <pos x=""> <pos y=""> <pos z=""> <scl x=""> <scl y=""> <scl z=""> <r> <g> <b> <ka> <kd> <ks> <kr> <n> CourseNana.COM

... // up to 14 additional sphere specifications CourseNana.COM

LIGHT <name> <pos x=""> <pos y=""> <pos z=""> <ir> <ig> <ib> CourseNana.COM

... // up to 9 additional light specifications CourseNana.COM

BACK <r> <g> <b> CourseNana.COM

AMBIENT <ir> <ig> <ib> CourseNana.COM

OUTPUT <name> CourseNana.COM

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. CourseNana.COM

Output File Format CourseNana.COM

You should output your images in PPM format. You can choose binary (P6) or text-based ppm (P3). The text-based format is very simple, but it is important to understand the assumptions about which pixel is where (where (0,0) is for example). Example code for these has been provided in C++ attached to the assignment. We must be able to open your output files in a viewer that is freely available see clarifications below. CourseNana.COM

https://netpbm.sourceforge.net/doc/ppm.html CourseNana.COM

Marking Scheme Total Marks: 26 CourseNana.COM

  1. [2] Coding Style (i.e. well designed, clean, & commented code) CourseNana.COM

  2. [2] x 12 For each of the given test cases. CourseNana.COM

  3. [-4 Marks if not] Provide a readme.txt that describes what you have done, what you have CourseNana.COM

    omitted, and any other information that will help the grader evaluate your work, including what is CourseNana.COM

    stated below. CourseNana.COM

There will be no partial marks given if your program fails to parse an input file or if it does not produce the correct output. CourseNana.COM

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. CourseNana.COM

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) CourseNana.COM

Requirements/Policies CourseNana.COM

Collaboration CourseNana.COM

None. If you discuss this assignment with others, you should submit their names along with the assignment material. CourseNana.COM

Original Work CourseNana.COM

The assignment must be done from scratch. Apart from the code provided, you should not use code from any other source, including the previous offering of the class. (see clarifications below) CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
C++代写,Ray Tracer代写,Java代写,Python代写,Computer Graphics代写,C++代编,Ray Tracer代编,Java代编,Python代编,Computer Graphics代编,C++代考,Ray Tracer代考,Java代考,Python代考,Computer Graphics代考,C++help,Ray Tracerhelp,Javahelp,Pythonhelp,Computer Graphicshelp,C++作业代写,Ray Tracer作业代写,Java作业代写,Python作业代写,Computer Graphics作业代写,C++编程代写,Ray Tracer编程代写,Java编程代写,Python编程代写,Computer Graphics编程代写,C++programming help,Ray Tracerprogramming help,Javaprogramming help,Pythonprogramming help,Computer Graphicsprogramming help,C++assignment help,Ray Tracerassignment help,Javaassignment help,Pythonassignment help,Computer Graphicsassignment help,C++solution,Ray Tracersolution,Javasolution,Pythonsolution,Computer Graphicssolution,