What Is a Ray?

[ LiB ]

What Is a Ray?

Light is such a beautiful wonder ; the way it moves and travels is such an amazing notion. Light can be emitted from many sources such as a lamp or a light bulb. As the light source gives off energy, each light wave moves away from the light source, traveling through space until it interacts with matter. Consider the example in Figure 3.1.

Figure 3.1. Electromagnetic waves being emitted from a light source.

graphic/03fig01.gif


Now if you stop and think for a moment about each light wave moving from one point to another in a straight-line path , you can deduce that light is similar to something in mathematics called a ray. A ray in mathematics has an origin from where it begins, a direction to where it's heading, and a destination to where it ends. This is perfect for what you need. So you can deduce that a very thin beam of light is classified as a ray. Now let's look at the revised model in Figure 3.2 using a series of rays being emitted from the light source instead of electromagnetic waves.

Figure 3.2. Collection of rays being emitted from a light source.

graphic/03fig02.gif


The reason why people use the ray is because there is no simple way to actually simulate electromagnetic waves in computers (of course a quantum computer could do this, but we need to wait like 20 years !). Remember computers are just machines, so we need to develop methods of replicating what nature actually does and transform them to a language the computer knows . The ray simulates the path light takes from one point to another. When a ray interacts with an object, the ray is bounced in some arbitrary direction based on the ray's direction and the object's position. Let's look at some examples of ray interactions in Figure 3.3.

Figure 3.3. Examples of ray interaction.

graphic/03fig03.gif


[ LiB ]


Focus On Photon Mapping
Focus On Photon Mapping (Premier Press Game Development)
ISBN: 1592000088
EAN: 2147483647
Year: 2005
Pages: 128
Authors: Marlon John

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net