All the math that I went through in class is in the ray tracing class notes, which you might want to use for guidance.
Do as many of the following as you can:
As before, there are many other things you can do for extra credit in this assignment, and I'll be very open minded if you do something really cool. You get extra credit (and really cool results) if you use the noise function (source code is listed at http://mrl.nyu.edu/perlin/noise/).
You can also try refraction - in which you bend the ray using Snell's Law, and keep tracing into the surface. Combining this with a flying saucer shape (intersection of two spheres) makes a really nice optical lens. If you're really ambitious - you can make a telescope! Snell's law states that if a ray traveling from a medium with index of refraction of n_{1} enters a surface at an angle θ_{1} from the perpendicular to the surface, and enters into a medium that has an index of refraction of n_{2}, then it will end up having an angle θ_{1} from the perpendicular to the surface, where n_{1} sin (θ_{1}) = n_{2} sin (θ_{2}). Typically, air has an index of refraction of about 1.0, and glass has an index of refraction of about 1.3 to 1.5. |