Applications of Linear Transformation I. Computer Graphics: Example: 1. Reflection with respect to x-axis: u L : R
Views 80 Downloads 1 File size 148KB
Applications of Linear Transformation I. Computer Graphics: Example:
1. Reflection with respect to x-axis: u L : R 2 R 2 , L 1 u2
u 1 0 A 1 u 2 0 1
u1 u1 u u . 2 2
For example, the reflection for the triangle with vertices 1, 4 , 3, 1 , 2, 6 is 1 L 4
1 , L 4
3 1
3 , L 1
2 6
2 . 6
The plot is given below.
2, 6 1, 4 3, 1
3, 1
1, 4
2, 6 2. Reflection with respect to y x : L : R 2 R 2 , L
u1 u 2
u 0 1 u1 u 2 A 1 . u2 1 0 u2 u1
Thus, the reflection for the triangle with vertices 1, 4 , 3, 1 , 2, 6 is 1
1 L 4
4 , L 1
3 1
1 , L 3
6 . 2
2 6
The plot is given below
2, 6 1, 4 3, 1
4, 1
1, 3 6, 2 3. Rotation: u u cos sin u1 L : R 2 R 2 , L 1 A 1 u 2 sin cos u2 u2 For example, as ,
2
sin 0 2 2 A sin 2 cos 2 1 cos
1 0
.
Thus, the rotation for the triangle with vertices 0, 0 , 1, 0 , 1, 1 is L
0 0
1 L 0
0 1
0 1
1 0
0 0 0 0 , .
1 0
1 0 0 1 ,
1 0
1 1 1 1 .
and 1 L 1
0 1
2
The plot is given below.
0, 1
1, 1
0, 0
1, 1
1, 0
4. Shear in the x-direction: u L : R 2 R 2 , L 1 u2
u1 ku2 , k R. u2
For example, as k 2 ,
u L 1 u2
u1 2u2 u2
Thus, the shear for the rectangle with vertices 0, 0 , 0, 2 , 4, 0 , 4, 2 in the xdirection is 0 L 0
0 0 , L 0 2
4 4 , L 2 0
The plot is given below.
3
4 4 , L 0 2
8 . 2
4, 2
0, 2 0, 0
8, 2
4, 0
II. Cryptography: Suppose we want to send the following message to our friend,
MEET TOMORROW. For the security, we first code the alphabet as follows: A
B
…
X
Y
Z
1
2
…
24
25
26
Thus, the code message is
MEET TOMORROW M 13
E 5
E 5
T 20
T 20
O 15
M 13
O 15
R 18
R 18
O 15
W 23
The sequence
13 5 5 20 20 15 13 15 18 18 15 23 is the original code message. To encrypt the original code message, we can apply a linear transformation to original code message. Let L : R 3 R 3 , L x Ax,
where 1 A 1 0
2 1 1
3
2 . 2
Then, we break the original message into 4 vectors first,
4
13 20 13 18 5 , 20 , 15 , 15 , 5 15 18 23
and use the linear transformation to obtain the encrypted code message 13 L 5 5
13 1 A 5 1 0 5
2 1 1
3 2 2
13 38 5 28 , 15 5
20 1 A 20 1 15 0
2 1 1
3 2 2
20 105 20 70 15 50
13 1 A 15 1 0 18
2 1 1
3 2 2
13 97 15 64 , 51 18
18 1 A 15 1 0 23
2 1 1
3 2 2
18 117 15 79 . 61 23
20 L 20 15
13 L 15 18
and 18 L 15 23
Then, we can send the encrypted message code 38 28 15 105 70 50 97 64 51 117 79 61 Suppose our friend wants to encode the encrypted message code. Our friend can find
the inverse matrix of A first, A
1
1 1 0
2 1 1
3 2 2
1
0 2 1
1 2 1
1 1 1
and then 38 0 A 28 2 15 1
1 2
105 0 A 70 2 50 1
1 2
97 0 A 64 2 51 1
1 2
1
1
1
1
1
1
and
5
1 1 1
38 13 28 5 , 15 5
1 1 1
105 20 70 20 , 50 15
1 1 1
97 13 64 15 51 18
117 0 A 79 2 61 1 1
1 2 1
1 1 1
117 18 79 15 61 23
Thus, our friend can find the original message code
13 5 5 20 20 15 13 15 18 18 15 23 via the inverse matrix of A. Similarly, if we receive the following message code from our friend
77 54 38 71 49 29 68 51 33 76 48 40 86 53 52 and we know the message from our friend transformed by the same linear transformation 1 L : R R , L x Ax 1 0 3
2 1
3
1
3 2 x. 2
Thus, we first break the message into 5 vectors, 77 71 68 76 86 54 , 49 , 51 , 48 , 53 , 38 29 33 40 52
and then the original message code can be obtained by 77 0 A 54 2 38 1
1 2
71 0 A 49 2 29 1
1 2
68 0 A 51 2 33 1
1 2
76 0 A 48 2 40 1
1 2
86 0 A 53 2 52 1
1 2
1
1
1
1
1
1
1
1
1 1 1
77 16 54 8 , 38 15
1 1 1
71 20 49 15 , 29 7
1 1 1
68 18 51 1 , 33 16
1 1 1
76 8 48 16 , 40 12
1 1 1
86 1 53 14 . 52 19
and 1
1
Thus, the original message from our friend is 16 8 15 20 15 7 18 1 6
16
8
16
12
1
14
19
P
H
O
T
O
G
R
A
PHOTOGRAPH PLANS
7
P
H
P
L
A
N
S