On 9 May 2013 01:59, Igor Stasenko <siguctua(a)gmail.com> wrote:
On 8 May 2013 22:19, Alexandre Bergel
<alexandre.bergel(a)me.com> wrote:
>> Your matrixes are 2x2 ? I thought they
would be 3x3, I haven't verified, by having 3x3 for 2d plans allows for zooming. But
maybe you do not need since Athens handles this apart.
>
well, matrix in athens is 2x3 affine matrix.
(consider it is like a full 3x3 matrix but with all zeros at bottom row)
simply because if you extend 2d vector to 3d, you put z-component to 0..
that means , if you multiply such vector with full 3x3 matrix,
the 3rd row will be completely ignored, because z-component does not
contributes to
x and y coordinates.
actually to be more correct,
affine matrix is 3x3 , with bottom row = (0 0 1)
and 2d vector is assumed to have z=1
like that if you multiply vector by such matrix, z coordinate always
stays = 1 (identity)
while 3rd column of matrix contributes to linear translation in XY plane.
so, since bottom row is always the same (as well as z-coordinate of
extended 2d vector)
they are not needed to be stored as data.
yeah, and the key property of affine matrix that transformation stays
linear, no matter what
e.g. that you can decompose it into 3 simple parts: scale(can be
non-uniform), rotation and translation.
Therefore a non-linear transformation (like perspective projection) is
not possible since it will require higher order matrix (like 4x4 used
by OpenGL) to get 1 more degree of freedom.
--
Best regards,
Igor Stasenko.