Page 292 -
P. 292
3. Construct a (2 ⊗ (n + 1) matrix, the G matrix, where the elements
of the first row consist of the ordered (n + 1)-tuplet, (x , x , x , …,
1
2
3
x , x ), and those of the second row consists of the corresponding
n
1
y coordinates (n + 1)-tuplet.
4. Plot the second row of G as function of its first row.
Example 9.1
Plot the trapezoid whose vertices are located at the points (2, 1), (6, 1), (5, 3),
and (3, 3).
Solution: Enter and execute the following commands:
G=[2 6 5 3 2; 1 1 3 3 1];
plot(G(1,:),G(2,:))
To ensure that the exact geometrical shape is properly reproduced, remember
to instruct your computer to choose the axes such that you have equal
x-range and y-range and an aspect ratio of 1. If you would like to add any text
anywhere in the figure, use the command gtext.
9.1.2 Inversion about the Origin and Reflection about the Coordinate
Axes
We concern ourselves here with inversion with respect to the origin and with
reflection about the x- or y-axis. Inversion about other points or reflection
about other than the coordinate axes can be deduced from a composition of
the present transformations and those discussed later.
• The inversion about the origin changes the coordinates as follows:
x ′ =−x
(9.1)
y ′ =−y
In matrix form, this transformation can be represented by:
− 1 0
P = (9.2)
0 −1
• For the reflection about the x-axis, denoted by P , and the reflection
x
about the y-axis, denoted by P , the transformation matrices are
y
given by:
© 2001 by CRC Press LLC