[Matrix-SIG] matrix transformations on vector graphics

Just van Rossum just@letterror.com
Wed, 15 Apr 1998 20:04:20 +0200

At 10:48 -0700 4/15/98, David Ascher wrote:
>Indeed -- there was a discussion on similar topics a few months back --
>check the findmail archives re: use of complex numbers for graphics.

I'll do that, thanks.

>Why do you define a 3x3 array if you're just using 2d coordinates?
>I'd say
>	tm = Numeric.array([[1,0],[0,-1]], Float)
>is closer to what you want.

For this particular one, yes. But I'd like to to PostScript-like
transformations, which can also translate. A 2x3 would suffice, but then it
isn't a matrix anymore, and I'd like to use matrixmultiply...

>And then, you can just use the 'dot()' function:
>	>>> Numeric.dot(v, tm)
>	array([[   0.,    0.],
>	       [  10.,    0.],
>	       [ 100.,  -75.]])

That's cool. I see that perhaps I'd better stick with 2x2 and do the
translation separate: that should easy enough.

Thanks again,