2
$\begingroup$

I have a 1x3 matrix representing a point in space:

[x] [y] [1] 

And a 3x3 matrix representing an affine 2d transformation matrix

[a][b][c] [d][e][f] [g][h][i] 

How to I multiply the matrices so that I am given the matrix?

[newX] [newY] [w] 
  • 0
    it is a $3*1$ matrix.2011-03-27

1 Answers 1

3

Basic matrix multiplication works here.

$ \begin{bmatrix} c_x \\ c_y \\ c_w \end{bmatrix} = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} $

$ c_x = a\, x + b\, y + c $ $ c_y = d\, x + e\, y + f$ $ c_w = g\, x + h\, y + i$

with your new point at $(x,y) = (c_x/c_w, c_y/c_w)$

You will find examples here.

  • 1
    try https://www.youtube.com/watch?v=Xzu8_Fe3ImI and http://mrl.nyu.edu/~dzorin/igf06/lecture05/lecture05.pdf2017-01-25