Geometrical Transformations 2D Geometrical Transformations: Translation
Geometrical Transformations 2D Geometrical Transformations: Translation
Geometrical Transformations 2D Geometrical Transformations: Translation
2D Geometrical Transformations
Shear x ' x t x
y ' = y + t
Homogenous Coordinates y
Matrix Representations (x,y)
Composite Transformations x
Rotation Scaling
x=x cos - y sin x=Sx x
y y
y=x sin + y cos y=Sy y
(x,y)
x x
1
Shear Homogenous Coordinates
x=x + hx y Each position (x, y) is represented as (x, y, 1).
y=y
All transformations can be represented as matrix
multiplication.
x ' 1 hx x
y ' = 0 1 y Composite transformation becomes easier.
Translation Rotation
in Homogenous Coordinates in Homogenous Coordinates
x=x+tx x=x cos - y sin
y y
y=y+ty y=x sin + y cos
P = (x,y)
x ' 1 0 t x x x ' cos sin 0 x P = (x,y)
y ' = 0 1 t y y ' = sin cos 0 y
y P = (x,y)
1 0 0 1 1 P = (x,y) 1 0 0 1 1
x x
P = T(tx , ty) P P = R( ) P
CSC5870 Computer Graphics I CSC5870 Computer Graphics I
Scaling Shear
in Homogenous Coordinates in Homogenous Coordinates
x=sx x x=x + hx y
y
y=sy y y=y
(x,y)
x ' s x 0 0 x x ' 1 hx 0 x
y ' = 0 s 0 y y ' = 0
y 1 0 y
1 0 0 1 1 (x,y)
1 0 0 1 1
x
P = S(sx , sy) P P = SHx P
CSC5870 Computer Graphics I CSC5870 Computer Graphics I
2
2D Geometric Transformations 2D Geometric Transformations
Translation Translation
Rotation Rotation
Scaling Scaling
Shear Shear
Homogenous Coordinates Homogenous Coordinates
Composite Transformations Composite Transformations
Rotation about a fixed point
(xr ,yr)
3
Rotation About a Fixed Point
1. Translate the object to the origin.
2. Rotate around the origin.
(xr ,yr)
3. Translate the object back.
1 0 xr cos sin 0 1 0 xr
3D Geometrical Transformations
0 1 y sin cos 0 0 1 y r
r
0 0 1 0 0 1 0 0 1
T(xr , yr) R( ) T(-xr , -yr)
P = T(xr , yr) R( ) T(-xr , -yr) P
CSC5870 Computer Graphics I CSC5870Computer
CS8610 ComputerGraphics
GraphicsII I University of Missouri at Columbia
4
Rotation about y-axis Rotation About a Fixed Point
x ' cos 0 sin 0 x y 1. Translate the object to the origin.
y ' 0 1 0 0 y 2. Rotate about the three axis, respectively.
=
z ' sin 0 cos 0 z 3. Translate the object back.
1 0 0 0 1 1 P = T (xr , yr, , zr) R T (-xr , -yr, , -zr) P
x
P = Ry() P R = Rx(x) Ry(y) Rz(z)
z
Scaling Shear
y
x' sx 0 0 0 x x ' 1 0 hx 0 x
y ' 0 s y ' 0 1 hy 0 y
0 0 y
(x,y,z)
= y =
z ' 0 0 sz 0 z z ' 0 0 1 0 z
(x, y, z)
1 0 0 0 1 1 1 0 0 0 1 1
x
P = S P P = SHxy P
z
x x
x z
z
z P = M P z