Your parser should be able to read our xml based input file format:
Input file specification
java -jar <your jar file> <path to example xml file>
<your executable> <path to example xml file>
./program Downloads/example3.xml
The above command should output the parsed content of the file. Your output should look like this (
doesn't have to match exactly, but you have to print out at least all the information):
outputFile: example3.png
camera
position: Vec3[0.0, 0.0, 1.0]
lookat: Vec3[0.0, 0.0, -2.5]
up: Vec3[0.0, 1.0, 0.0]
horizontalFOV: 45
maxBounces: 8
ambientLights
color: Color[1.0, 1.0, 1.0]
parallelLights
color: Color[1.0, 1.0, 1.0]
direction: Vec3[0.0, -1.0, -0.25]
surfaces
sphere:
position: Vec3[-2.1, 2.0, -3.0]
materialSolid:
color: Color[0.17, 0.18, 0.5]
phong: Phong{ka=0.3, kd=0.9, ks=1.0, exponent=200}
reflectance: 0.0
transmittance: 0.0
refraction: 2.3
sphere:
position: Vec3[0.0, 2.0, -3.0]
materialSolid:
color: Color[0.5, 0.17, 0.18]
phong: Phong{ka=0.3, kd=0.9, ks=1.0, exponent=200}
reflectance: 0.0
transmittance: 0.0
refraction: 2.3
sphere:
position: Vec3[2.1, 2.0, -3.0]
materialSolid:
color: Color[0.18, 0.5, 0.17]
phong: Phong{ka=0.3, kd=0.9, ks=1.0, exponent=200}
reflectance: 0.0
transmittance: 0.0
refraction: 2.3
sphere:
position: Vec3[0.0, -2.0, -5.0]
materialSolid:
color: Color[0.48, 0.5, 0.17]
phong: Phong{ka=0.3, kd=0.9, ks=1.0, exponent=200}
reflectance: 0.0
transmittance: 0.0
refraction: 2.3
In order to get a full mark, you need to do all of the assigned tasks AND adhere to to lab procedures while creating readable and efficient code. I.e. if you accomplish only 70% of the tasks correctly, but you do not adhere to lab procedures, your final mark will be 70*(1-0.05) = 66.5%.