Appendix B: Using POV-RAY and Moray
Overview
Some of the Graphics in this book probably caught your eye and made you think “Wow, that’s pretty cool. How did he do that?” In particular, the dice from Chapters 1 and 2, the tiles that make up the NineTiles game in Chapter 3, and the asteroids from Chapter 9 were all created using a technique known as raytracing.
Note | Scott Hudson created the models of the asteroids, which were used with his permission. See [http://www.eecs.wsu.edu/~hudson/Research/Asteroids] for more information. |
Ray tracing is a technique where light waves are “traced” from light sources into the description of a scene, and the reflection of these light sources tells a computer program how to draw the scene. Put another way, a ray tracer simulates the way that the human eye decodes light waves into pictures. The input of aray tracing program is the description of a scene. For example, a scene might consist of a light source and a geometric shape such as a cube. You can assign the cube surface properties such as color, bumpiness, ambience, and reflection. All of these properties will affect how the cube looks to an observer in the ascribed light conditions. The ray tracing program takes that scene description and turns it into a visual image of the cube.