Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

3x3 transformation matrices

Could anyone look at the below link and find the info on  3x3 transformation matrices and scaling, and then tell me how I go back and forth between two coordinate systems, an original coordinate system and a scaled coordinate system.  How do I use that matrix to do this?  I kind of need the answer in plain English terms, because my math skills are minimal. (not what they used to be 30 years ago.).  

This page states "Mathematically, all transformations can be represented as 3x3 transformation matrices of the following form..."

http://www.w3.org/TR/SVG/coords.html
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

From the link:
"Scaling is equivalent to the matrix
[ Sx  0   0 ]
[ 0   Sy  0 ]
[ 0    0   1 ]"

So if you want to go to a coordinate system that is scaled to 3 times the size, use
[ 3 0 0 ]
[ 0 3 0 ]
[ 0 0 1 ]

And to go back, use
[ 1/3  0     0 ]
[  0    1/3  0 ]
[  0     0     1 ]

If you want to scale the x and y coordinates separately, then put the x scale factor in the first row (Sx) and the y one in the next.
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

thanks