Previous | Next --- Slide 27 of 57
Back to Lecture Thumbnails
unreal

Can someone please explain the representation of reflection and scaling with the matrix? What would the result matrices look like if, for instance, you were scaling by 3?

Erawn1

@unreal I think its helpful to write out examples - in the 2D case its doable with pencil and paper. Think about doing the matrix multiplication between our scaling matrix and the vector [X, Y] - we get [.5X, 2Y]. If we wanted to scale X by 3, our top entry of our scaling matrix would multiply X by 3 and Y by 0 - aka [3 0]. Next we scale Y by 3 and X by zero in the bottom - [0 3]. Thus our scaling matrix is [3 0, 0 3]. For reflection, imagine you had a 2x2 matrix and wanted all the X coordinates to be flipped (multiplied by -1), then we can use a scaling matrix with the same logic, but instead of 3 we put -1 for the top row (and we wouldn't scale or reflect in the y direction so we would use [0 1] for the bottom.)

brijeshp

@unreal Here's a link with some additional diagrams that might help: https://www.tutorialspoint.com/computer_graphics/2d_transformation.htm