Matrix Multiplication bug and workaround
hh at hyperhh.de
Sun Jul 30 19:42:30 EDT 2017
Yes. I saw this mistake several times. The misleading thing is, TMHO,
the name "transformation matrix" for [a,b,c,d,e,f] (because the listing
is pairwise for columns, as you now describe, and not for rows).
Let me explain that a bit simpler for readers who don't know or forgot
It would be better to name it, what it is, a "transformation list".
[a,b,c,d,e,f] lists the factors [a,b,c,d] and the summands [e,f] that
define the "affine transformation" of a point (x_old,y_old) to a point
x_new = a*x_old + c*y_old + e
y_new = b*x_old + d*y_old + f
[a,d] are the scaling factors for (x_old,y_old),
[b,c] are the shearing factors for (x_old,y_old),
[e,f] are the translation summands for (x_old,y_old).
So [1,0,0,1,0,0] defines the identity: x_new = x_old and y_new = y_old.
Every scaling, shearing, translation or rotation of a point (x_old,y_old)
can be built by ONE single set of such a list [a,b,c,d,e,f].
p.s. These were the first two minutes of my talk at LC Global in Nov 2017.
Now I can start after that, describing how to find that single set, without
matrix algebra ;-)
More information about the Use-livecode