Test Vol 1 Jun. 2014 | Page 6

1. Defining the space – Defining the 2D space Picture 3: An example of screen space and fixed projection space Transforming between 2D spaces Screen space to projection space Transformation means moving a point from a space into another. 2D transformations are very simple. Firstly let us derive a function that will transform a point in screen space into projection space. For x we just need to change x’s range from [0, width] to [-0.5 * a, 0.5 * a] where a = aspect ratio: Let w = width h = height 0≤