Re: Help with understanding matrices
Re: Help with understanding matrices
- Subject: Re: Help with understanding matrices
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 12 Feb 2008 20:40:08 -0500
OK, so let me see if I understand the problem. You've got an image
that has been embedded into an Adobe Illustrator document. That image
may have rotation and/or scaling applied to it relative to the
original image, and you're trying to work out what that rotation
and/or scaling is. But you can't directly ask Illustrator for either
of those quantities; all you can get is the combined transformation
matrix used to accomplish the rotation and/or scaling. Is that
correct?
That's a little hard to do because the elements of a matrix for a
combined scale/rotate includes the *product* of the scaling factor and
the sine or cosine of the rotation angle. Separating them back out
turns into a problem in factoring.
If the image is scaled by a factor of Sx in the horizontal direction
and Sy in the vertical direction, and rotated through an angle T, then
the matrix will have these four quantities:
Sx * cos(T)
-Sx * sin(T)
Sy * sin(T)
Sy * cos(T)
Which you then have to solve for Sx, Sy, and T.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden