Page 298 -
P. 298
Similarly in the definition of G, we should append to the old definition, a row
with all elements being 1.
In this coordinate representation, the different transformations thus far dis-
cussed are now multiplicative and take the following forms:
− 1 0 0
P = 0 −1 0 (9.19)
0 0 1
1 0 0
P = 0 −1 0 (9.20)
x
0 0 1
− 1 0 0
P = 0 1 0 (9.21)
y
0 0 1
s x 0 0
S = 0 s y 0 (9.22)
0 0 1
cos( θ) − sin( θ) 0
R( )θ = sin( θ) cos( θ) 0 (9.23)
0 0 1
1 0 t x
T = 0 1 t y (9.24)
0 0 1
The composite matrix of any two transformations can now be written as
the product of the matrices representing the constituent transformations. Of
course, this economizes on the writing of expressions and makes the calcu-
lations less prone to trivial errors originating in the expansion of products
of sums.
Example 9.3
Repeat Example 9.2, but now use the homogeneous coordinates.
Solution: The following script M-file implements the required task:
© 2001 by CRC Press LLC