I'm working in 2D, with 3x3 matrices.
I have an object at position T. I want to rotate/scale around the origin.
- Origin position O
- Rotation R
- Scale S
- Origin position P
To find my matrix, I would normally do this:
- Translate by O
- Rotate by R
- Scale by S
- Translate by -O
- Translate by P
Except for the problem I'm working on right now, I need to construct the same transformation matrix, but I don't have the original position O.
Instead, I have the final position (after the scale and rotation) of the object, O'.
I'm not really sure how to tackle this. My gut tells me it's probably very simple, but it's been hounding me for almost an entire day now.