Changes between Version 2 and Version 3 of DevWikiAffineParameters


Ignore:
Timestamp:
09/13/11 09:07:32 (13 years ago)
Author:
bnordgren
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevWikiAffineParameters

    v2 v3  
    1919 * x' = xcosθ − ysinθ
    2020 * y' = xsinθ + ycosθ
     21
     22To rotate in the clockwise direction:
     23
     24[[Image(CW_rotation.png)]]
     25
     26 * x' = xcosθ + ysinθ
     27 * y' = − xsinθ + ycosθ
     28
     29=== Scaling ===
     30
     31Scaling is used to set the size of the raster's grid cells in the x and y direction. The transformation is as follows:
     32
     33[[Image(scaling.png)]]
     34
     35 * x' = x s,,x,,
     36 * y' = y s,,y,,
     37
     38=== Shearing ===
     39 
     40Shearing is visually equivalent to a "slanting" which is parallel to either the x or the y axis. This is a less common operation than rotation and scaling. These are presented as individual operations: one for each axis.
     41
     42Shearing parallel to the x axis takes the following form.
     43
     44[[Image(shear_x.png)]]
     45
     46 * x' = x + k,,x,,y
     47 * y' = y
     48
     49While shearing parallel to the y axis has this form:
     50
     51[[Image(shear_y.png)]]
     52
     53 * x' = x
     54 * y' = k,,y,,x + y
     55
     56== Combining individual operations ==
     57
     58Whenever more than one of the above operations is required, they may be combined using [http://en.wikipedia.org/wiki/Matrix_multiplication matrix multiplication]. As an example, all of the above matrices will be combined into one. The result of such a combination is still not an affine transform, however. It is just a 2x2 matrix has all the individual functions aggregated into it.
    2159
    2260