1

I have two translation matricies in the form of

[
  [1, 0, dx],
  [0, 1, dy],
  [0, 0, 1]
]

Is there a multiplication I can do which would leave me with:

[
  [1, 0, dx1],
  [0, 1, dy2],
  [0, 0, 1]
]

And another which would leave me with

[
  [1, 0, dx2],
  [0, 1, dy1],
  [0, 0, 1]
]

For context, I have the translations of two opposite points of a quad with centre 0,0. I would like to use matrix multiplication to get the other two points of the quad, which would each be equal to the X value of one point and the Y value of the opposite. I get the quad to the origin by a series of transforms, so I was hoping to use more matrix multiplication, rather than plucking values out of a matrix to plug them in another again.

I tried applying a scale matrix but when they get multiplied back in they result in 0's where there shouldn't be 0's (I'm not a mathematician, you can probably tell).

Sam
  • 111
  • Why do you translate the corners different amounts? – Andrei Oct 23 '21 at 13:38
  • If I have 4 corners of an unrotated rectangle, and I know the position of two opposite corners which I have as translations from the origin, say T1 and T2. I can work out the translations of T3 and T4 as they each have the x component of one translation and the y component of the other. Does this help? – Sam Oct 23 '21 at 14:57

0 Answers0