MATRIX
A transformation given by its six numbers, or a perspective one by nine.
Syntax
MATRIX(a,b,c,d,e,f)
MATRIX(a,b,c,d,e,f,g,h,i)
| Argument | Meaning |
|---|---|
| a, b | Where the X direction goes: a position [x,y] becomes [a·x + c·y + e, b·x + d·y + f]. |
| c, d | Where the Y direction goes. |
| e, f | The move. |
| g, h, i | A perspective: both of those are divided by w = g·x + h·y + i. Left out: 0, 0 and 1 (none). |
Result
A transformation.
Examples
In the example drawing:
| Expression | Gives |
|---|---|
[10,20]*MATRIX(1,0,0,1,5,5) |
[15,25] |
[10,20]*MATRIX(-1,0,0,1,0,0) |
[-10,20] |
[10,20]*MATRIX(1,0,0,1,0,0,0,0,2) |
[5,10] |
Notes
A transformation is used by multiplying a position by it: P1*ROTATE(P0,90). The Transform tool writes these.
A perspective one (nine numbers) is what HOMOGRAPHY gives, and how its value is written.
See also: HOMOGRAPHY, TRANSLATE, ROTATE, SCALE, MIRROR, IDENTITY.