# 213 - A5.5 - Graphical Transformations

## 1013 days ago by Professor213

x = [1 3 4 0] y = [2 1 0 1] A = [1 0 ; 0 -1] out = A*[x; y] fill(x,y,'r',out(1,:),out(2,:),'b') axis('square','on') out(1,:)
 x = 1 3 4 0 y = 2 1 0 1 A = 1 0 0 -1 out = 1 3 4 0 -2 -1 0 -1 ans = 1 3 4 0 2 |-------------------------------------------------| | + ##XXXXXXX+ ##### + + + | 1.5 |-+ ###XXXXXXXXXXXXXX ##### +-| | ###XXXXXXXXXXXXXXXXXXXXXX ##### | | ##XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ## | 1 |#####XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#### +-| | ##########XXXXXXXXXXXXXXXXXXXXXXXXX ## | 0.5 |-+ ##########XXXXXXXXXXXXXXXXX ### +-| | ##########XXXXXXXXXX ## | | ##########XX #| 0 |-+ %%%%%%%%%%%%%%| | %%%%%%%%%% XXXXXXX%% | -0.5 |-+ %%%%%%%%%% XXXXXXXXXXXXXX%%% +-| | %%%%%%%%%% XXXXXXXXXXXXXXXXXXXXXX%% | |%%%%% XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%% | -1 |%%%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%%%% +-| | X%%%XXXXXXXXXXXXXXXXXXXXXXXX%%%%% | -1.5 |-+ XX%%%XXXXXXXXXXXXXXXX%%%%% +-| | XX%%XXXXXXXXX%%%%% | | + XX%XXX%%%%% + + + + | -2 |-------------------------------------------------| 0 0.5 1 1.5 2 2.5 3 3.5 4  x = 1 3 4 0 y = 2 1 0 1 A = 1 0 0 -1 out = 1 3 4 0 -2 -1 0 -1 ans = 1 3 4 0 2 |-------------------------------------------------| | + ##XXXXXXX+ ##### + + + | 1.5 |-+ ###XXXXXXXXXXXXXX ##### +-| | ###XXXXXXXXXXXXXXXXXXXXXX ##### | | ##XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ## | 1 |#####XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#### +-| | ##########XXXXXXXXXXXXXXXXXXXXXXXXX ## | 0.5 |-+ ##########XXXXXXXXXXXXXXXXX ### +-| | ##########XXXXXXXXXX ## | | ##########XX #| 0 |-+ %%%%%%%%%%%%%%| | %%%%%%%%%% XXXXXXX%% | -0.5 |-+ %%%%%%%%%% XXXXXXXXXXXXXX%%% +-| | %%%%%%%%%% XXXXXXXXXXXXXXXXXXXXXX%% | |%%%%% XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%% | -1 |%%%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%%%% +-| | X%%%XXXXXXXXXXXXXXXXXXXXXXXX%%%%% | -1.5 |-+ XX%%%XXXXXXXXXXXXXXXX%%%%% +-| | XX%%XXXXXXXXX%%%%% | | + XX%XXX%%%%% + + + + | -2 |-------------------------------------------------| 0 0.5 1 1.5 2 2.5 3 3.5 4