Ray tracers are best known for mirrors and glass. Take some time and experiment, to see why. Here are a few tips for figuring out how to employ reflection and refraction effectively in your scenes.
Also, here’s a closing challenge for you: suppose you wanted to render a scene where you were looking through the surface of a pond at some rocks beneath it. In terms of implementation, that would be a transparent plane, with some spheres scattered below it. As your ray tracer is currently implemented, the plane is going to cast a shadow on anything beneath it, which leaves everything under the water in darkness, ruining the effect. You could add a light source beneath the plane, but that will introduce odd shadows and highlights—not a good solution either.
What you really want is for some objects to “opt out” of the shadow calculation. The surface of the pond, for instance, should be ignored when calculating shadows.
How would you go about changing your ray tracer to support that? What would you need to do to allow objects to individually declare that they cast no shadow?
Chew on that one for a bit. When you’re ready to move on, turn the page! Next up, you’ll add another primitive shape to your ray tracer: the humble cube.
See Wikipedia’s entry on the Halting problem: https://en.wikipedia.org/wiki/Halting_problem
Here’s one such list: http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/indrf.html
Many online sites have a copy. Here’s one: https://graphics.stanford.edu/courses/cs148-10-summer/docs/2006--degreve--reflection_refraction.pdf.
3.145.151.141