Project: More Testcases
More Testcases
When you submit a milestone, I will run additional tests. On this page you can find these additional tests, and the results of the reference implementation.
Milestone 1
You can download the submission test cases here. Extract them into your data/tests
-directory, and you can set the input
to e.g. data/tests/submission1/test1.json
to run these additional tests.
/submission1/test1.json
: A simple sphere with an offset
/submission1/test2.json
: A different sphere
/submission1/test3.json
: A third sphere
/submission1/test4.json
: Three spheres, where one is partially obscured by another
/submission1/test5.json
: A plane
/submission1/test6.json
: Tilted plane
/submission1/test7.json
: Plane and sphere, but the plane point away from the sphere. In my implementation, it is not visible at all (I only show the “outside” of the plane); if you show exit-hits, the lighting will likely be bad.
/submission1/test8.json
: A triangle
/submission1/test9.json
: Two triangles
Milestone 2
You can download the submission test cases here. Extract them into your data/tests
-directory, and you can set the input
to e.g. data/tests/submission2/test1.json
to run these additional tests.
/submission2/test1.json
: The union of two spheres
/submission2/test2.json
: The intersection of two spheres
/submission2/test3.json
: The difference between two spheres
/submission2/test4.json
: The difference between two spheres (same as in test 3, but with an offset)
/submission2/test5.json
: The intersection of tests 3 and 4
/submission2/test6.json
: The union of two intersections of two spheres each (each is vaguely football-shaped)
/submission2/test7.json
: The difference of one of the intersections of test 6 and the other (i.e. we cut a football-shaped hole into another football)
/submission2/test8.json
: The intersection an intersection of two spheres (one of our footballs), and the union of the other two.
/submission2/test9.json
: The intersection an intersection of two spheres (one of our footballs), and the difference of the other two.
/submission2/test10.json
: The intersection of two planes
/submission2/test11.json
: The intersection of three planes
/submission2/test12.json
: The intersection of two planes and a sphere
/submission2/test13.json
: The difference of a plane and a sphere
/submission2/test14.json
: The difference of a plane and the intersection of two spheres
/submission2/test15.json
: Test case 14 from a different angle
Milestone 3
You can download the submission test cases here. Extract them into your data/tests
-directory, and you can set the input
to e.g. data/tests/submission3/test1.json
to run these additional tests.
/submission3/test1.json
: A sphere with Phong lighting (exponent = 100 should cause two specular highlights)
/submission3/test2.json
: A purple-ish sphere with Phong lighting. Note that the light only emits red and green light and there is very little ambient contribution, making the sphere appear more red.
/submission3/test3.json
: The same sphere as in test 2, with light that emits all three colors equally.
/submission3/test4.json
: Two spheres that overlap slightly with Phong lighting, with shadows disabled.
/submission3/test5.json
: The same two spheres as in test 4, with shadows enabled. Note that slight shadow right below where the red and green spheres intersect.
/submission3/test6.json
: A white sphere with three lights of three different colors ((r=255,g=255), (r=255,b=255) and (b=255,g=255)), with a sphere behind that camera that blocks the effect of the three lights in different parts of the sphere. Note that in the center all three lights are blocked, and the sphere appears black.
/submission3/test7.json
: Three lights shining on the surface of the intersection of two spheres.
/submission3/test8.json
: Three spheres with different materials.
/submission3/test9.json
: A sphere on a plane, with shadows enabled.
/submission3/test10.json
: A sphere some distance above a reflective plane.
/submission3/test11.json
: Two reflective spheres on a reflective plane with a reflection-limit of 2.
/submission3/test12.json
: The same objects as in test 11, with a reflection-limit of 100
/submission3/test13.json
: The intersection of two spheres above a reflective plane.
/submission3/test14.json
: A sphere over the reflective moon from milestone3/test14
. Note that only the lunar surface is reflective and the craters are not.
/submission3/test15.json
: The moon from milestone3/test14
on a reflective plane.
/submission3/test16.json
: Similar to submission3/test6
, but instead of a sphere blocking the light we have an object that’s the intersection of two spheres, giving the different areas on the visible sphere somewhat irregular outlines.
Milestone 4
You can download the submission test cases here. Extract them into your data/tests
-directory, and you can set the input
to e.g. data/tests/submission3/test1.json
to run these additional tests.
/submission4/test1.json
: A sphere with basic lighting.
/submission4/test2.json
: A sphere with phong lighting (one light source)
/submission4/test3.json
: A sphere with phong lighting (two light source)
/submission4/test4.json
: A sphere with phong lighting (two light source, but one won’t affect the sphere, color-wise)
/submission4/test5.json
: A textured sphere with phong lighting.
/submission4/test6.json
: A textured sphere with basic lighting.
/submission4/test7.json
: Two textured spheres.
/submission4/test8.json
: The intersection of two textured spheres.
/submission4/test9.json
: The intersection of two textured spheres (different light position).
/submission4/test10.json
: A plane with basic lighting.
/submission4/test11.json
: A plane with phong lighting (one light source).
/submission4/test12.json
: A plane with phong lighting (two light sources).
/submission4/test13.json
: A textured plane with phong lighting (two light sources).
/submission4/test14.json
: A textured plane with phong lighting (two light sources), different scale.
/submission4/test15.json
: The intersection of a textured sphere and a plane.
/submission4/test16.json
: The intersection of a textured sphere and two planes, with phong lighting.
/submission4/test17.json
: The intersection of a textured sphere and three planes.
/submission4/test18.json
: The intersection of a textured sphere and four planes.
/submission4/test19.json
: A triangle with basic lighting.
/submission4/test20.json
: A triangle with phong lighting.
/submission4/test21.json
: Two triangles with phong lighting.
/submission4/test22.json
: A textured triangle.
/submission4/test23.json
: A textured triangle (different texture coordinates).
/submission4/test24.json
: A textured triangle (different texture).
/submission4/test25.json
: Two textured triangles.
/submission4/test26.json
: Two textured triangles with a sphere blocking the light/causing a small shadow.
/submission4/test27.json
: Two textured triangles with the intersection of two spheres blocking the light/causing a small shadow.
/submission4/test28.json
: The difference between one larger sphere and the union of three smaller spheres.
/submission4/test29.json
: A plane behind the object from test28, with a light throwing shadows.
/submission4/test30.json
: A plane behind the object from test28, with two light sources with different colors throwing shadows.
/submission4/test31.json
: A reflective plane behind the object from test28, with two light sources with different colors throwing shadows.
/submission4/test32.json
: Now one of the spheres that is used to construct the object is reflective.
/submission4/test33.json
: Now the plane is also reflective.
/submission4/test34.json
: The difference of a red sphere and a textured sphere.
/submission4/test35.json
: Same as test 33, but the textured sphere is slightly reflective, and there is a green sphere behind the camera that is reflected. Reflection limit is 1!
/submission4/test36.json
: Same as test 35, but the sphere that is being reflected is now textured.
/submission4/test37.json
: Same as test 36, but with a higher reflection limit.
/submission4/test38.json
: Moving the textured sphere towards the object.
/submission4/test39.json
: Same as test 38, but with an x-offset.
/submission4/test40.json
: The object from test 28, but now one of the inner spheres is textured.
/submission4/test41.json
: A different inner sphere is textured.
/submission4/test42.json
: The object from test 40 inside a carved out sphere, with shadows.
/submission4/test43.json
: Intersecting the object from test 40 with another sphere, putting it inside the carved out sphere and making the inner surface reflective. Fun.
/submission4/test44.json
: A textured cylinder.
/submission4/test45.json
: A textured cone.
/submission4/test46.json
: A textured paraboloid.
/submission4/test47.json
: The intersection of a textured hyperboloid of one sheet and two spheres.
/submission4/test48.json
: The intersection of a textured hyperboloid of two sheets and two spheres.
/submission4/test49.json
: The difference of a cone and a moved and rotated (and textured) cylinder
/submission4/test50.json
: A lens in front of test case 42.
/submission4/test51.json
: A rotated triangle. Very innocent.