→Textures and the Screen
No edit summary |
|||
| Line 27: | Line 27: | ||
The way in which the image coordinates map to Texture frame coordinates, and then onto Screen Coordinates (or vice versa) is through a series of <b>Affine Transformations</b>, these are transformations which preserve linearity (points which lay on a line before the transformation, continue to lay on a line after it), and distance ratios (the ratio of distance between two pairs of points on a line before the transformation remain the same afterwards). In the 2D world affine transformations are any combination of: | The way in which the image coordinates map to Texture frame coordinates, and then onto Screen Coordinates (or vice versa) is through a series of <b>Affine Transformations</b>, these are transformations which preserve linearity (points which lay on a line before the transformation, continue to lay on a line after it), and distance ratios (the ratio of distance between two pairs of points on a line before the transformation remain the same afterwards). In the 2D world affine transformations are any combination of: | ||
* | * Translation (Moving things relative to the origin) | ||
* Rotation (Rotating around the origin) | * Rotation (Rotating around the origin) | ||
* Scaling (Multiplying one or both axes by a constant factor) | * Scaling (Multiplying one or both axes by a constant factor) | ||
| Line 33: | Line 33: | ||
==Textures and the Screen== | ==Textures and the Screen== | ||
For the Texture frame coordinate to Screen coordinate mapping there's a simple | For the Texture frame coordinate to Screen coordinate mapping there's a simple translation and scaling process, since we cannot shear or rotate on-screen frames, but for the mapping from image coordinates to the Texture frame, the full set are available. | ||
Logically the process by which a point is transformed from image space to a point on screen can be represented by two transformations T, the transformation from the image to the Texture, and then S, the transformation from the Texture to the screen (I'll go into the math later): | Logically the process by which a point is transformed from image space to a point on screen can be represented by two transformations T, the transformation from the image to the Texture, and then S, the transformation from the Texture to the screen (I'll go into the math later): | ||