Requirements
- Support scenes consisting of spheres and triangles. The algorithms described in the lecture videos for intersecting these shapes translate well into brief Python/NumPy implementations.
- Support perspective cameras. The correct behavior of the camera is described in the lecture video on viewing; in our system the camera's position and orientation are specified in the from-target-up style, and the camera parameters are described using vertical field of view and aspect ratio.
- Support modified Blinn-Phong shading with point and ambient lights. The equations for this are laid out in the lecture video on shading. The names for the material parameters match the slides from the video, though we use
k_d
for the diffuse coefficient that is mostly written "R_d / pi" in those slides. - Render mirror reflection and shadows. The algorithms are described in the slides from the video. Limit recursion depth to 4 levels. Mirror reflections should use the mirror reflection coefficient
k_m
stored in the material. - The
bg_color
property of the scene should appear in the background of the image.
The combination of point lights, one ambient light, and mirror reflection constitutes the "glazed" shading model from the lecture.
Your program must implement the interfaces specified in the starter code, so that it is compatible with our test cases. You should not import new packages beyond the ones we are using (if you have something you'd like to use for convenience just ask).