Important! $ \text{point }(x,y)\text{ is represented by column vector } \begin{bmatrix} x\\ y\\ 1 \end{bmatrix} $
Why the extra "1" coordinate? Just accept for a moment, and we will discuss once you've played around with these ideas for a bit.We will look at linear transformations from $\mathbb{R}^3$ to $\mathbb{R}^3$, so if $T$ is a linear transformation, and if $\boldsymbol{u}$ is vector representing point $p$, then $T(\boldsymbol{u})$ gives us a new vector which (if we're lucky and the third coordinate is 1) corresponds to a new point. So $T$ maps points to points. So what kind of operations do we get?
g++ a0.cpp -o a0 -O2 -larmadillo... and run it as:
./a0
An image like that on the right should popup on your screen.
mat T = I; to mat T =
A;, compile and run, and keep doing it for A,B,C,D.
What does transformation A do?______________________ What does transformation B do?______________________ What does transformation C do?______________________ What does transformation D do?______________________
T = A*B and then try T
= B*A and compare the output. Explain why you get
one result with A*B and another with B*A! (Make sure to check me that your explanation is
correct!)cout << T
at the end of main. This will print out the matrix that
defines your linear transformation T. Write it down (with
just two digits after the decimal point).