Test Vol 1 Jun. 2014 | Page 4

1. Defining the space – Defining the 2D space 1 Defining the space Before we can jump into deriving methods for rendering floors, walls and other things we need to define our 2D and 3D spaces to make deriving easier. 1.A Defining the 2D space In order to make rendering possible, we need to define 2 different spaces in 2D. These are: 1. Screen space  Origin is at the top-left corner  x is in range [0, width)  y is in range [0, height)  x and y can only be integers To overpass the dependency on the screen size, we define another space: 2. Projection space  Origin is at the screen’s centre  x is in range [-0.5, 0.5]  y is in range [-0.5, 0.5]  x and y can be a real number Picture 1: Screen space and projection space comparison The reason why this space is called projection space and why x and y are in range [-0.5, 0.5] will become apparent later. Projection space and aspect ratio 2