Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Flash has the ability to export animations into a format they call motion XML. Its specification is here

I am trying to write a python renderer for these animations using pyglet. I understand everything, except the "skewX" and "skewY" properties. The spec describes "skewX" as "The angle (in degrees) of shearing along the horizontal axis. If the skewX and skewY values are equal, they are replaced by the rotation attribute."

Now, when I looked up shearing, it turns out that it doesn't describe what they mean by it. Equal shearing along X and Y does not result in rotation around Z. Furthermore, I've noticed that they sometimes represent mirroring around Y as a skewY of 180 degrees. Shearing does not do this. This page is particularly helpful when it comes to shearing. It says the shear matrix for a given angle is:enter image description here

So my question is this, what is the transform that they actually mean by this? What transform skews along X or Y, for values greater than 180 degrees causes mirroring and when used equally on X and Y results in rotation?

Any clues would be helpful. Also, if this question belongs somewhere else(not on math.stackexchange please let me know and I'll move it)

share|improve this question
    
You should be asking in some forum dedicated to flash... There you will find (hopefully!) information about what the drafters of the spec meant. –  Mariano Suárez-Alvarez Apr 16 '12 at 7:32

1 Answer 1

up vote 1 down vote accepted

I ran into the same issue / question. I was able to find the matrices Adobe was generating by making a short script and looking at the DisplayObject.transform.matrix property of a sample shape that I applied different values for shear to through the Transformation tool.

After trying this for a few values, I am convinced the transform Adobe is applying for shear is splitting X/Y of a rotation transform :

\begin{bmatrix} \cos(\text{shearY}) & \sin(\text{shearY}) & 0\\ -\sin(\text{shearX}) & \cos(\text{shearX}) & 0\\ 0 & 0 & 1 \end{bmatrix}

If shearX == shearY this is equal to a rotation transform, and at shearX == 180 or shearY == 180 (degrees) it creates -1 scale transforms on Y or X respectively.

share|improve this answer
    
Wow, I had despaired of finding an answer to this one. I'm trying this out and if it turns out this is the correct answer I'll upvote and accept within 24hrs :) –  entropy Aug 27 '12 at 19:30
    
Yep, this is it. Thanks! :) –  entropy Aug 28 '12 at 11:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.