Documente Academic
Documente Profesional
Documente Cultură
Each line is transformed into another straight line (this will be proved in general
subsequently), with transformed endpoints:
The given figures in F5.12 shear into the figures with new points:
a) (-1,0), (0,1), (1,0), (0, -1) → (-1, 0), (0, 1), (1, 0.4), (0, -1)
b) (0,0), (0,1), (1,1), (1, 0) → (0, 0), (0, 1), (1, 1.4), (1, 0.4)
c) (1,1), (1, 2), (2, 2), (2,1) → (1, 1.4), (1, 2.4), (2, 2.8), (2, 1.8)
5.2.5.
Solution: To invert a Shear.
M 1 =
- h
0
1
0
0
1
/(1-gh). This is a shear only if gh = 0
5.2.8. Solution:
Fixed Points of an Affine Transformation.
M 11 M 12 0
a) when the third column of M is (0,0,1), M= M 21 M 22 0
M M 31 1
31
M 11 M 12 0
M (0, 0, 1) = M 21
T M 22 0 (0, 0, 1) T = (0, 0, 1) T
M M 31 1
31
Origin is a fixed point
b) T(P) = T(P-F+F) = T(P-F)+T(F) = M(P - F)+ F.
c) Point V is the fixed point for a rotation about point V.
cos( ) sin( ) d x
MV= sin( ) cos( ) d y (Vx, Vy, 1)T
0 0 1
=( V x cos( ) VY sin( ) d x , V x sin( ) VY cos( ) d y , 1 )
Since
d x cos( )V x sin( )V y V x
d y sin( )V x cos( )V y V y
MV= ( V x cos( ) VY sin( ) d x , V x sin( ) VY cos( ) d y , 1 ) = (V x , V y , 1)
Point V is the fixed point for a rotation about point V.
e) Point V is the fixed point for a scaling with scale factors Sx and Sy, about V.
f) T(T(P)) = T(M(P - F)+ F) = M2(P - F)+ F
T(T(T(P))) = T(M2(P - F)+ F) = T(M2(P - F))+ T(F)= M3(P - F)+ F
1 0 2 cos( ) sin( ) 0 1 0 2 2 0 0
a) 0 1 1 sin( ) cos( ) 0 0 1 1 0 1 0
0 0 1 0 0 1 0 0 1 0 0 1
.
1 0 1 S x 0 - 2S x 2
b) 0 1 1 0 Sy - 3Sy 3
0 0 1 0 0 1
3
0 .5 0
1 0 1 2 2 0 0 1 0.3 0 1 0 - 1
3
c) 0 1 1 0.5 0 0 1 0 0 1 0
0 1 - 1 =
0 2
0 1
0 0
1 0 0
1 0 0 10 0 1
2.31 0.19 - 2.01
1 1.165 - 0. 3
0 0 1
The given box is a rectangle, with its lower edge tiled at angle = 30
1. rotate through -30
2. scale by (1/w, 1/2w), where w = 5
1 3 1
0 0 0
5 2 2
1 1 3
M= 0 0
2 2
0 =
2 5
0 0
1
0 0 1
0.3867 - 0.2235 0
0.1118 0.1933 0
0 0
1
Rotate 180
cos180 sin 180 0 1 0 0
M2 = sin 180 cos180 0 = 0 1 0
0 0 1 0 0 1
M1 = M2
So a reflection in x followed by a reflection in y is the same as a rotation by 1800.
0 0 1 0 0 1
cos 2 cos 1 sin 2 sin 1 cos 2 sin 1 sin 2 cos 1 0
= sin 2 cos 1 cos 2 sin 1 sin 2 sin 1 cos 2 cos 1 0
0 0 1
cos( 2 1 ) sin( 2 1 ) 0
= sin( 2 1 ) cos( 2 1 ) 0
0 0 1
= R (1 + 2)
R(1) followed by R() is equivalent to applying the single rotation R(1 + ).
Thus successive rotations are additive.
1 0 0 1 h 0 1 h 0
g 1 0 0 1 0 = g 1 gh 0
0 0 1 0 0 1 0 0 1
Which is a shear if gh = 0.
P = A + bt where b = B - A.
So P = A + bt = A + (B – A)t = (1 - t) A + t B
|P - A| = | t B – t A| = t |B – A|
|P - B| = | (1– t) A +(t -1) B | = |(1 - t) (B – A)| = (1 - t) |A – B| = (1 - t) |B – A|
This is true if t lies outside of the range 0 to 1 because t + (1 – t) = 1.
T(P) = (1 - t) T(A) + t T(B)
|T(P) - T(A)| = | - t T(A) + t T(B)| = t | T(B) – T(A)|
|T(P) - T(B)|.= (1 - t) | T(B) – T(A)|
Exercise 5.3.1.
Solution.
Yes, by direct visualization, 90o rotations about each axis rotate each axis into
another To visualize the 90° .
Rotating a point on the x – axis about the x – axis has no effect for the point.
Rotations
Also we can get the familiar results for y – roll and z – roll. So a 90 rotation about each
axis rotates the other axes into one another.
a rotation by 45 degrees.
This is reasonable since the y-coord Is not affected, due to the placement of zeroes in the
matrix.
cos90 = 0, sin90 =1
For x – roll,
1 0 0 0 1
0 0
Q xi = 0
0
0
1
- 1
0
0
0
0
1
=
0 0 1
1 0 0
0 0 1
0 Q xj = 1 Q xz = 1
1 1 1
i i ; j k ; k -j
for y-roll,
0 0 1
0
Q yi =
0
1 Q yj = 1
0
Q yz = 0
1
1 1
i -k ; j j ; k i
for z-roll,
0 1 0
0
Qzi = 1
0
Q zj =
0
0
Qzk = 1
1
1 1
i k ; j -i ; k k
2 T1
c) shear:
1 0 0 0
T1T2 =
f 1 0 0
0 0 1 0
0 0 0 1
1 k 0 0
0
=
1 0 0
0 0 1 0
0 0 0 1
1 k 0 0
f 1 fk 0 0
0 0 1 0
0 0 0 1
1 k 0 0
T T 0
=
1 0 0
0 0
2 1
0 1
0 0 0 1
1 0 0 0
f
=
1 0 0
0 0 1 0
0 0 0 1
1 fk k 0 0
f 1 0 0
0 0 1 0
0 0 0 1
They commute if fk = 0.
1 0 0 m14
0 1 0 m24 1
0 0 0
T2 T1 = 0
=
c - s 0
m34
0 s c 0
0 0 1
0 0 0 1
0 0 0 1
1 0 0 m14
0 c - s m24
0 s c m24
0 0 0 1
T 1 T 2 is not the same as T 2 T 1 . Familiar with x-roll, we can get the same result by y –
roll and z – roll.
0 0 0 1
Sx 0 0 0
0 cS y sS z 0
0 sS y cS z 0
0 0 0 1
Sx 0 0 0
0 cS y sS y
0
T2 T1 =
0 sS z cS z 0
0 0 0 1
T1T2 is not the same as T 2 T 1 .
T1T2 = 0
=
1 0 0
0 S z 0
0 0 1 0
0
0 0 0 1
0 0 0 1
x
S kS 0 0
x
0 Sy 0 0
0 0 S z 0
0 0 0 1
Sx kS y 0 0
0 1 0 0
T2 T1 =
0 0 Sz 0
0 0 0 1
T 1 T 2 is not the same as T 2 T 1 .
R u () = 0 c - s 0
0 s c 0
0 0 0 1
5.3.9. Solution:
Orthogonal Matrices.
By direct calculation each of the three rotation matrices has orthogonal columns (and
rows), each of length 1. The determinant of an orthogonal matrix is 1. Partition
orthogonal matrix M into its columns:
c1T
M = (c1| c2 | c3), so M T = c2
T
c3 T
. Now note that M M T = I, the identity
Based on the hint that accompanies this problem we need only show that the product of
two orthogonal matrices is orthogonal. Suppose A and B are orthogonal, and set C =
A * B. Now examine C-1.
We must show C-1 is the same as CT. But for any matrix C the inverse can be written as
the reversed product of its individual inverses, so C-1 = B-1 * A-1, and since these guys are
orthogonal, we have C-1 = BT * AT.
Now since the transpose of a product can be written as the product of transposes (but
reverse their order), C-1 = (A*B)T, so yes indeed, C-1is CT!
5.3.12. Solution: What if the axis of rotation does not pass through the origin?
1. translate to the origin through –S
2. apply the rotation
3. translate back through S
Suppose we have a 2D coordinate frame #1 as shown in Figure 5.31, with origin and
axes i and j. Further suppose we have an affine transformation T(.) represented by
matrix M. So T(.) transforms coordinate frame #1 into coordinate frame #2, with new
origin ’ = T( ), and new axes i’ = T(i) and j’ = T(j).
i’= M(1, 0, 0)T = Mi ; j’= M(0, 1, 0)T = Mj
ci’ + dj’ + ’ = cM(1, 0, 0)T + dM(0, 1, 0)T+ M(0, 0, 1)T= c Mi + d Mj + M
c
M(c, d, 1)T= M d
1
= c Mi + d Mj + M
ci’ + dj’ + ’ is the same as M(c, d, 1)T and M(c, 0, 0)T+ M(0, d, 0)T + M(0, 0, 1) T.
The same result in Equation 5.35.
cos A - sinA 0 e
0 e cos A f sin A
e sin A A
b) P = sin A cos A f = f cos
0 0
1 1
1
The point (e, f) in the new system lies at (e cos(a) - f sin(a), e sin(a) + f cos(a)), where
a = A / 180 radians.
3 0 0 e
0 3e
2 f
c) P = 0 2 f =
0 0
1
1
1
The point (e, f) in the new system lies at (3e, 2f) in the original system.
1 0 0 e
0 e
d) P = 0 1 f =
f
0 0
1
1
1
The point (e, f) lies in the original system at (e, -f).
a) OAB is equilateral
So OA=AB=R
Length of a hexagon is R too
a).
n eye look
u up n
v nu
So that u.v = 0; u.n = 0; n.v = 0;
u, v, and n are mutually perpendicular.
b)
ux u y uz d x
vx v y vz d y
V eye (eye.x, eye. y , eye.z, 1)
nx n y nz d z
0 0 0 1
= (eye u dx , eye v dy , eye n dz, 1)
= (eye u eye u, eye v eye v, eye n eye n, 1)
= (0, 0, 0, 1)
ux uy uz dx
v vy vz dy
V u x (u.x, u. y , u.z , 0) = (u u, u v, u n, 0) = (1, 0, 0, 0)
n ny nz dz
x
0 0 0 1
Similarly, V v (0, 1, 0, 0)
V n (0, 0, 1, 0)
c)
n eye look = (4, 3, 4)
i j k
u up n = 0 1 0
= (4, 0,-4)
4 3 4
Normalize u, v, and n,
n = (0.70711, 0, 0.70711)
u = (-0.3313, 0.8834, - 0.3313)
v = (0.6247, 0.4685, 0.6247)
dx =-eye.u =(4, 4, 4) . (-0.3313, 0.8834, - 0.3313) = 0
dy =-eye.v =(4, 4, 4) . (0.6247, 0.4685, 0.6247) = -0.88345
dz =-eye.n =(4, 4, 4) . (0.70711, 0, 0.70711) = -6.872
So that,
.70711 0 .70711 0
. 3313 .88345 .3313 .88345
V
.6247 .4685 .6247 6.872
0 0 0 1