[Prev] [Home] [Next]

By knowing the field of view (FOV) and the dimension of the projection plane, we can calculate the angle between subsequent rays and the distance between the player and the projection plane. These steps are illustrated in Figure 11 (Many books define these last two values arbitarily, without telling the reader where the values come from, here is the justification.)


FIGURE 11
Here is what we know:



Here is what we can calculate (brush up on your Trigonometry if you don't understand, most of these are high school level math):


So now we know:
  • Dimension of the Projection Plane = 320 x 200 units
  • Center of the Projection Plane = (160,100)
  • Distance to the Projection Plane = 277 units 
  • Angle between subsequent rays = 60/320 degrees
(We will occasionally refer the "angle between subsequent rays" as the "angle between subsequent columns." Later, this angle will be used to loop from column to column. The distance between player to the projection plane will be used for scaling.)

 

[Prev] [Home] [Next]