BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C++代写 | CSC 305 A01 – A02 X Assignment 3

C++代写 | CSC 305 A01 – A02 X Assignment 3

本次加拿大CS代写主要是使用C++实现光线追踪

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
or
> java RayTracer testCase1.txt
or
> 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:

Content

  1. The near plane**, left**, right**, top**, and bottom**
  2. The resolution of the image nColumns* X nRows*
  3. The position** and scaling** (non-uniform), color***, Ka***, Kd***, Ks***,

    Kr*** and the specular exponent n* of a sphere

  4. The position** and intensity*** of a point light source
  5. The background colour ***
  6. The scene’s ambient intensity***
  7. The output file name (you should limit this to 20 characters with no spaces)

* int ** float *** float between 0 and 1

Syntax

NEAR <n>
LEFT <l>
RIGHT <r>
BOTTOM <b>
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>

OUTPUT <name>

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.

MARKING SCHEME

26 Total Marks

[2] Coding Style (i.e. well designed, clean, & commented code)
[2] 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)

Requirements/Policies Collaboration

bestdaixie

评论已关闭。