title: How to reproduce an object's translation,rotation,scaling? (possibly language agnostic)
body: <p>All,</p>
  
  <p>I've got a rather frustrating problem that I think is simple, but my brain is just not working. In short, the problem is: given a sprite/image/thingy, you know that someone has rotated/translated/scaled the sprite, but you don't know the order in which these happen, how can you reproduce the exact image?</p>
  
  <p>For illustration purposes -- Given an image like this:
  <img src="https://i.stack.imgur.com/kXb4w.png" alt="Given an image like this"></p>
  
  <p>Someone has the ability to rotate/translate/scale it so that it looks like this (What it looks like after manipulation --- there's two of them in this case...)
  <img src="https://i.stack.imgur.com/Orkms.png" alt="What it looks like after manipulation"></p>
  
  <p>I know that the <a href="http://msdn.microsoft.com/en-us/library/ms533864%28v=vs.85%29.aspx" rel="nofollow noreferrer">order of operations matter</a>, that is if someone first rotates, then scales, then translates, you get a different image than if you were to do the reverse. The problem is that since I don't know the order beforehand, I am having a tough time reproducing the image. Here is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/DdiqF.png" alt="enter image description here"></p>
  
  <p>And here is what it looks like overlaid to give you an idea of how far off I am:</p>
  
  <p><a href="http://infinitetaco.com/pics/merged.png" rel="nofollow noreferrer">http://infinitetaco.com/pics/merged.png</a></p>
  
  <p>I am setting the anchorPoints of the sprites to be at the center, so that isn't the issue. I am also taking into account the width/height of the scaled change, but for some reason it's always just a bit off. It seems that the more dramatic the amount of rotation, the further off my results are. In the right image you can see the result is perfect, but the left one, since there is significant rotation, it is way off. </p>
  
  <p>I know this is probably an easy one, but I'd appreciate some help.</p>