Putting It Together

Your code is written. Your tests are passing. It’s time to see how these shadows look in practice.

Start with the program you wrote at the end of the last chapter. If you set it up to duplicate the scene in the book, you should see each of those colored spheres casting shadows now! If you designed your own scene, you may or may not need to move things around so that shadows are being cast on other objects; make the changes necessary until you can demonstrate that shadows are truly being rendered.

Then, start playing! Deform your spheres and watch the shadows deform accordingly. Simulate an eclipse by positioning a smaller sphere between a larger one and the light source. If you’re feeling particularly ambitious, see if you can make some shadow puppets by deforming and translating spheres!

images/shadows/puppets.png

Once you’ve wrung all the fun you can out of casting shadows, move on! It’s time to add another graphics primitive to join your spheres: the plane.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.98.71