Homework 5: Due Saturday, December 10, 2011, emailed by 11.59PM (10/100 points)
Homework 5 Overview
In this project, you will create a simple ray traced scene with just spheres and meshes.
Homework 5 (Part A): Preparation (Not to be turned in)
In this preparation, you will do some simple tasks that will allow you to set up procedural rendering to a 2D texture, which your ray tracer shall build on.
- Set up Mandelbrot example: Section 9.8.5 of your text describes a setup to render the Mandelbrot set. Example2.cpp and its associated shaders on the book website implement a working mandelbrot set program: [ Here ]. Get the program and set it up. The general set up for this program shall be used in setting up our ray tracer. Once the basic setup for rendering to a texture is set up, our raytracer shall simply render into the same texture as the Mandelbrot set, which is then display.
- Add interesting colors to the Mandelbrot set: Try to change the default colors to an interesting Mandelbrot pattern. This exercise is useful in learning how to control the colors the procedural renderer uses.
- Render a red circle: Change mandelbrot renderer to output following pattern. A red circle of user-specified radius is rendered onto a black background as shown below. You can declare two colors in your program: a red foreground color and a black background color.
Homework 5 (Part B): to be turned in by due date
Ray trace a scene with two spheres of different colors. Your submitted program should have the following behavior:
- User hits 'R' or 'r', Raytrace your scene at a blockSize of 1
- User hits '2', Raytrace your scene at a blockSize of 2
- User hits '4', Raytrace your scene at a blockSize of 4
- Requirements: Your scene should include:
i) Make one of the spheres reflective and close enough that light reflects off each other
ii) Make one of the spheres refractive (see through) object
iii) Shadows
Submission
Create documentation for your programs and submit them along with the projects. The documentation does not have to be unnecessarily long. Simply explain briefly what each file does,how to run it and tie things in nicely. Name your project FirstName_LastName_hw5.zip and email your project by the due date.