Graphics Reference
In-Depth Information
Y
t
I
X
Fig. 7.4. 2D homogeneous coordinates can be visualized as a plane in 3D space,
generally where t = 1, for convenience.
which solves the above problem of adding a constant.
Let's now go on to see how homogeneous coordinates are used in practice.
7.3.1 2D Translation
The algebraic and matrix notation for 2D translation is
x = x + t x
y = y + t y
(7.21)
or, using matrices,
x
y
1
10 t x
01 t y
00 1
x
y
1
=
·
(7.22)
7.3.2 2D Scaling
The algebraic and matrix notation for 2D scaling is
x = s x x
y = s y y
(7.23)
or, using matrices,
x
y
1
s x 00
0 s y 0
001
x
y
1
=
.
(7.24)
Search WWH ::




Custom Search