Chapter 7
Making a Scene

Think about this for a second. You’ve written a program from scratch, with tests, that draws a three-dimensional object by simulating the behavior of light. That’s awesome.

And it’s still only the beginning! More complex scenes are just around the corner. By the end of this chapter you’ll be creating worlds with multiple objects and using a virtual camera to capture views of those objects from different viewpoints. Just a few more pages and you’ll be rendering images like those in Pierre’s gallery, here:

images/scene/triptych.png

To get there, you’ll first implement a world—a collection of all objects in a scene—as well as routines for intersecting that world with a ray and computing the colors for intersections. Then you’ll build a new matrix transformation, called the view transformation, which you’ll use to orient the view. Lastly, you’ll implement the camera, which encapsulates the view and provides an interface for rendering the world onto a canvas.

Ready? Go!

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

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