[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] canonical form for affine transformations

From: Eric Hughes
Subject: [Gnash-dev] canonical form for affine transformations
Date: Sun, 15 Apr 2007 20:42:39 -0600

Sandro's question about matrices last week, and a note I saw about possibly implementing "skew" (really called shear) in the commit log, led me to find some relevant reference information.

The transformation that's implemented in matrix.cpp:

Details about what a matrix representation of the above looks like:

As for a canonical form, I'd recommend
        rotate * x-shear * scale
which in matrix form is, in LaTeX form:
        \cos \theta     &   - \sin \theta \cr
        \sin \theta     &   \cos \theta
        1       &   k       \cr
        0       &   1
        s_x             &   0               \cr
        0               &   s_y

In the above, $\theta$ is the angle of rotation, $k$ is the shear value, and $s_x$ and $s_y$ are the scale values.

The reason for this choice is that, since these transformations are naturally applied to type, with its natural baseline along the x-direction, that x-shear is the natural cognitive choice. Putting it after (to the left of) the scaling means that the angle of shear will be independent of the size of the scale factors; otherwise the shear would also be scaled.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]